Created
April 23, 2017 09:48
-
-
Save lenafaure/d39256406feb7d85fd344308a50c26e8 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
function movieStar() { // function declaration is moved to the top of the global scope | |
var name; // variable declaration is moved to the top of the local scope | |
name = “Meryl Streep”; // variable assignement is left in place | |
console.log(name); | |
} | |
movieStar(); // Prints “Meryl Streep” |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment