Skip to content

Instantly share code, notes, and snippets.

@kevinfiol
Created February 20, 2019 18:08
Show Gist options
  • Save kevinfiol/d2bfdfa383db9e417040643d26c890a6 to your computer and use it in GitHub Desktop.
Save kevinfiol/d2bfdfa383db9e417040643d26c890a6 to your computer and use it in GitHub Desktop.
const sayHi = () => {
console.log(hi());
};
const hi = () => {
return 'hi';
};
sayHi();
// the variable is hoisted, just not the initialization
// if you moved up the sayHi() function call to be between them, you'd get an error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment