Skip to content

Instantly share code, notes, and snippets.

@cianclarke
Last active December 16, 2015 20:10
Show Gist options
  • Save cianclarke/5490768 to your computer and use it in GitHub Desktop.
Save cianclarke/5490768 to your computer and use it in GitHub Desktop.
Hoisting example
currentLocation = 'waterford';
function whereAreYa(){
console.log('1: ' + currentLocation);
var currentLocation = 'Dublin';
console.log('2: ' +currentLocation);
}
whereAreYa();
console.log('3: ' + currentLocation);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment