Skip to content

Instantly share code, notes, and snippets.

@KinoAR
Created November 16, 2017 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KinoAR/9d53b91a1f065d097cb9e224675136d2 to your computer and use it in GitHub Desktop.
Save KinoAR/9d53b91a1f065d097cb9e224675136d2 to your computer and use it in GitHub Desktop.
A code example to demonstrate the power of regular functions.
//Hoisting Example
const a = test(); //Hoisted Function Execution
const b = new test();
console.log("Ran before the function is defined", a); //Ran before the function is dined 3
console.log(b) //test{}
function test() {
return 3;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment