Last active
November 14, 2017 14:59
-
-
Save me-shaon/4af767bb7c775a5e60c49cfda175d556 to your computer and use it in GitHub Desktop.
Javascript hoisting example for Medium article
This file contains hidden or 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
function hoist() { | |
a = 10; | |
console.log(a); //this will print '10' | |
var a; | |
} | |
hoist(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment