Skip to content

Instantly share code, notes, and snippets.

@codeangler
Created May 21, 2016 03:16
Show Gist options
  • Save codeangler/094d438c39e0875c6a1451f791a79ed1 to your computer and use it in GitHub Desktop.
Save codeangler/094d438c39e0875c6a1451f791a79ed1 to your computer and use it in GitHub Desktop.
https://repl.it/mVA/164 created by codeangler
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 .
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