Last active
March 24, 2019 19:08
-
-
Save Damimd10/5326162055f22d92fda1ff34fba73fdd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var canIVote = 'No'; | |
function areYouOlderThan18() { | |
if (true) { | |
var canIVote = 'Yes'; | |
} | |
console.log(canIVote); // log 'Yes', not the global value of 'No' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment