I've heard that using global variable is bad in JavaScript. Since let is block-scoped can I use it within a block that includes all other functions and use it in a similar way to global variables?
{
var b = 10;
let c = 20;
function foo(){
return c;
}
}