Skip to content

Instantly share code, notes, and snippets.

@paschalidi
Created December 13, 2019 11:15
Embed
What would you like to do?
function foo() {
// All variables are accessible within functions.
var bar = 'bar';
let baz = 'baz';
const qux = 'qux';
console.log(bar);
console.log(baz);
console.log(qux);
}
console.log(bar);
console.log(baz);
console.log(qux);
if (true) {
var bar = 'bar';
let baz = 'baz';
const qux = 'qux';
}
console.log(bar);
console.log(baz);
console.log(qux);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment