JAVASCRIPT CLIMBSChapter 1 · JS Basics
Let and Const
In JavaScript, you declare variables using let or const. Use let if the value will change, and const for constants that stay the same.
Worked example
How it reads
- let sky creates a re-assignable variable named sky
- const stars creates a read-only constant variable stars
- console.log() is JavaScript's way of printing output

Cloud tip: Always default to const unless you know the variable needs to be re-assigned.


