Variables declared with the let keyword have this kind of scope. Answer 1 code example
Example: var vs let js
let: //only available inside the scope it's declared, like in "for" loop,
var: //accessed outside the loop "for"
let: //only available inside the scope it's declared, like in "for" loop,
var: //accessed outside the loop "for"