JavaScript · Exercise 1 of 5Next
Beginner
Keep score with const and let
Make a tiny score keeper. Declare a constant playerName with the value "Asha" and a variable score that starts at 0.
Add 10 to score, then add 5 more, by reassigning the variable (don't just write 15).
Show the text Asha: 15 points in the paragraph with id out. Don't use var.
What Check tests
- The page shows
Asha: 15 points playerNameis declared withconstscoreis declared withletand ends at 15- No
varanywhere
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.