Declare block-scoped variables using let, e.g., let x = 10;.
let
let x = 10;
Use let when a variable's value needs to change over time within its block scope.
for (let i = 0; i < 5; i++) { console.log(i); }