let const scope code example
Example 1: var vs let js
let: //only available inside the scope it's declared, like in "for" loop,
var: //accessed outside the loop "for"
Example 2: const let var scope
var num = 1; //var can be function or global scoped
const num = 2; //const can only be block scoped
let num = 3; //let can only be block scoped