Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Instruction
Define Variables with let and const
ES2015 introduced two new keywords for declaring variables: const and let. Both work similarly to var. You use the keyword -- const or let -- and a value you want to put into the variable:
let message = "Hello";
const pi = 3.14159;
let score = 0;
const is short for constant, meaning that the value of the variable shouldn't change -- it should remain "constant". const protects a variable from...