Created
December 16, 2019 23:02
-
-
Save johntran/e29f0ae1016cbf51bafa475199afe8b3 to your computer and use it in GitHub Desktop.
Function Hoisting: Assume that `foo` is the main function
This file contains hidden or 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
export default function foo() { | |
return bar(); | |
} | |
function bar() { | |
return baz(); | |
} | |
function baz() { | |
return 42; | |
} |
This file contains hidden or 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 baz() { | |
return 42; | |
} | |
function bar() { | |
return baz(); | |
} | |
export default function foo() { | |
return bar(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment