Created
May 21, 2016 03:16
-
-
Save codeangler/094d438c39e0875c6a1451f791a79ed1 to your computer and use it in GitHub Desktop.
https://repl.it/mVA/164 created by codeangler
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 car = "Honda Civic"; | |
showCar(); | |
var showCar = function(){ | |
console.log(car); | |
}; | |
// Because of hoisting the function expression is hoisted prior to the assignment of the function expression. Thus the call of the showCar(); breaks . |
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
Native Browser JavaScript | |
>>> TypeError: showCar is not a function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment