0Pricing
Javascript for Kids · Lesson

Making Questions

Create problems.

Making Questions is a free Javascript for Kids lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Javascript for Kids learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Be a Quiz Master! 🧠

Today YOU become the boss of a Math Quiz Challenge! 🎉

A quiz is just a list of questions. Let's build one with code! 💻

console.log('Welcome to the Math Quiz! 🧠')

What Is a Question? ❓

A math question is something like 3 + 4. The computer can solve it super fast! ⚡

console.log('What is 3 + 4 ?')
console.log('The answer is', 3 + 4)

Save the Question 📝

We can store a question in a variable so we can use it later.

let question = 'What is 5 + 2 ?'
console.log(question)

Save the Answer Too 🔑

Every question needs a correct answer. Let's keep it in its own variable! 🔑

let question = 'What is 5 + 2 ?'
let answer = 5 + 2
console.log(question)
console.log('Secret answer:', answer)

Make Many Questions 📚

A good quiz has lots of questions. We can make a whole bunch! 📚

console.log('Q1: 2 + 2 =', 2 + 2)
console.log('Q2: 6 - 1 =', 6 - 1)
console.log('Q3: 3 * 3 =', 3 * 3)

Use a List 📋

We can put all our questions in an array (a list). Lists keep things tidy! 📋

let questions = ['2 + 2', '6 - 1', '3 * 3']
console.log(questions)

Random Numbers 🎲

To make NEW questions every time, we use Math.random() to pick random numbers! 🎲

let a = Math.floor(Math.random() * 10)
let b = Math.floor(Math.random() * 10)
console.log('Your question:', a, '+', b)

Random Question + Answer ✨

Now let's make a random question AND know its answer! ✨

let a = Math.floor(Math.random() * 10)
let b = Math.floor(Math.random() * 10)
let answer = a + b
console.log('What is', a, '+', b, '?')
console.log('Answer:', answer)

Different Math Signs ➕➖

Questions can use +, -, or *. More fun, more challenge! 💪

let a = 8
let b = 3
console.log('Add:', a + b)
console.log('Subtract:', a - b)
console.log('Multiply:', a * b)

Number the Questions 🔢

Let's show Question 1, Question 2 so players know where they are! 🔢

console.log('Question 1: 4 + 4 =', 4 + 4)
console.log('Question 2: 9 - 3 =', 9 - 3)

Your Mini Quiz 🎮

Put it all together: a couple of questions with their answers ready to go! 🎮

console.log('Math Quiz Time! 🧠')
console.log('Q1: 5 + 5 =', 5 + 5)
console.log('Q2: 7 * 2 =', 7 * 2)
console.log('Good luck! 🍀')

Quick Check ✅

Time to test your brain! 🧠

You Did It! 🌟

Awesome! You learned to make quiz questions! 🎉

  • Questions can be stored in variables 📝
  • Lists hold many questions 📋
  • Math.random() makes new ones 🎲

Next up: checking the answers! ✅

console.log('Question maker: COMPLETE! 🌟')

Frequently asked questions

Is the “Making Questions” lesson free?

Yes — the full text of “Making Questions” is free to read here on the web, and the Javascript for Kids course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Javascript for Kids course, upgrade to CoddyKit PRO.

What will I learn in “Making Questions”?

Create problems. You practise Javascript for Kids with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Javascript for Kids?

No prior experience is required. Javascript for Kids on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Making Questions” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Javascript for Kids lesson?

Yes. Every Javascript for Kids lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Making Questions
  2. Checking Answers
  3. Keeping Score
  4. Final Score
← Back to Javascript for Kids