Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function foo() {
var x = 9;
if (x > 5) {
var x = 7;
console.log("Value of x in if statement = " + x);
console.log("Value of x outside if statement = " + x);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.