I am thinking about something like this in JavaScript:
function foo() { var a = 10 console.log(b) var b = 20 console.log(c) let c = 30 console.log(d)