JavaScript Scope and Variables

var x = 1;
// local scope
for (let x = 1; x < 100; x+=1) {...}
var y = 1;
function process(inp) {
    let y = inp * 2;
    return y;
}
process(y);
// constants
const x = 1;
x = 2; // 💣 BOOM!
120-gosinta