Last active
June 11, 2018 17:11
-
-
Save davidguttman/704ec0baac7d64e34ebb94cc553ebc9a to your computer and use it in GitHub Desktop.
Top vs Bottom Exports
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 boilPotatoes () {} | |
function mashPotatoes () {} | |
function cookTurkey () {} | |
function carveTurkey () {} | |
function preparePotatoes () { | |
boilPotatoes() | |
mashPotatoes() | |
} | |
function prepareTurkey () { | |
cookTurkey() | |
carveTurkey() | |
} | |
function makeDinner () { | |
prepareTurkey() | |
preparePotatoes() | |
} | |
module.exports = makeDinner |
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
module.exports = function makeDinner () { | |
prepareTurkey() | |
preparePotatoes() | |
} | |
function prepareTurkey () { | |
cookTurkey() | |
carveTurkey() | |
} | |
function preparePotatoes () { | |
boilPotatoes() | |
mashPotatoes() | |
} | |
function cookTurkey () {} | |
function carveTurkey () {} | |
function boilPotatoes () {} | |
function mashPotatoes () {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment