The Final Score
Show the result.
The Final Score is a free Javascript for Kids lesson on CoddyKit — lesson 4 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.
The Grand Finale! 🎊
The quiz is over! Now we reveal the final score with a big, exciting announcement. 🥁 Let us learn how to wrap up the show!
Announce the Score 📣
Tell the player how many they got right. Loud and proud!
let score = 4
console.log("Your final score is " + score + " points! 🎉")Out of How Many? ➗
Show the score AND the total questions, like "4 out of 5". Players love to see it!
let score = 4
let total = 5
console.log("You scored " + score + " out of " + total + "! 🌟")Perfect Score? 💯
Did they get them ALL right? Give them a special cheer with if!
let score = 5
let total = 5
if (score === total) {
console.log("PERFECT SCORE! 💯 You are amazing!")
}Different Cheers 🎺
Give different messages for different scores. High score? Big cheer! Low score? Kind words!
let score = 3
let total = 5
if (score >= 4) {
console.log("Wow, super smart! 🤩")
} else {
console.log("Nice try! Keep learning! 💪")
}Three Levels of Praise 🥇🥈🥉
Use else if to give gold, silver, or bronze messages!
let score = 3
if (score === 5) {
console.log("🥇 GOLD!")
} else if (score >= 3) {
console.log("🥈 SILVER!")
} else {
console.log("🥉 BRONZE!")
}A Final Score Function 🛠️
Make a reusable helper to announce any score nicely!
function showScore(score, total) {
console.log("You got " + score + "/" + total + "! 🎯")
}
showScore(4, 5)Counting the Percent 📊
Turn the score into a percent! Big kids math: divide and multiply by 100.
let score = 4
let total = 5
let percent = (score / total) * 100
console.log("You got " + percent + "%! 🎉")Saving a High Score 🥇
Remember the best score so players can try to beat it next time!
let best = 3
let thisGame = 5
if (thisGame > best) {
best = thisGame
console.log("New high score: " + best + "! 🏆")
}Thank You for Playing! 💖
Always end with kindness. Happy players come back for more!
console.log("Thanks for playing the Quiz Show! 🎤")
console.log("See you next time! 👋")Your Quiz Show is Done! ✅
You built a full quiz show: questions, order, scoring, and a final reveal! You are a TV producer now. 📺🎉
function finale(score, total) {
console.log("FINAL: " + score + "/" + total)
if (score === total) console.log("Champion! 🏆")
}
finale(5, 5)Quick Check ❓
The final brain teaser! 🧠
Quiz Show Champion! 🏆
You finished Build a Quiz Show! Recap:
- 📣 Announce the final score
- ➗ Show "X out of Y"
- 🥇 Give different cheers with
else if - 🛠️ Use a final-score
function
Take a bow, superstar! 🌟
Frequently asked questions
Is the “The Final Score” lesson free?
Yes — the full text of “The Final Score” 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 “The Final Score”?
Show the result. 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 4 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “The Final Score” 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
- Quiz Questions
- Asking in Order
- Scoring
- The Final Score