Asking a Question
Get the players question.
Welcome to Magic 8-Ball! 🎱
Hi there, fortune teller! 👋 We are building a Magic 8-Ball! 🎱
You ask it a question, give it a shake, and it tells you the future! 🔮 First, we need to get the player's question. Let's go!
What is a Question? ❓
A question is just text, like 'Will I get pizza tonight?' 🍕
In code, text is a string. Let's store a question in a box! 📦
let question = 'Will it be sunny tomorrow?';
console.log(question);All lessons in this course
- Asking a Question
- Random Answers
- Revealing the Fortune
- Add More Answers