Created
December 16, 2018 19:54
-
-
Save flavioribeirojr/0c2886a3a8e0a2bba1a8ff538cadb465 to your computer and use it in GitHub Desktop.
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 createDriver(name) { | |
return { | |
drive: function () { | |
console.log(`${name} is driving...`) | |
} | |
} | |
} | |
var vanDriver = createDriver('Rogerinho') | |
vanDriver.drive() // Rogerinho is driving... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment