Created
April 26, 2020 15:08
-
-
Save Katerina198b/d4dcb36b11cda84b6f2cca94ab621e7f 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
//cat.js | |
CAT_API = function () { | |
const name = "Barry"; | |
const getName = () => name; | |
const setName = (newName) => name = newName; | |
return {getName, setName} | |
})(); | |
//human.js | |
const callCat = () => `kitty kitty kitty, come here, ${CAT_API.getName()}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment