WeCodeAcademy

Variables

Variables store values. Use let for values that change and const for values that do not.

Examplejavascript
Open in editor »
Quick check

Which keyword declares a value that cannot be reassigned?

Your turn: write the code

Declare const name = "Kofi" and let score = 10. Add 5 to score, then print Kofi has 15 points by joining the pieces with +.

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.