Created
January 5, 2017 21:16
-
-
Save casprwang/1d5b346c6ec9b280a8e0449abe460382 to your computer and use it in GitHub Desktop.
pass val to an function inside of an object
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
// greet(); | |
// a(); | |
const a = function () { | |
console.log('h1'); | |
}; | |
function greet() { | |
console.log('h2'); | |
} | |
const log = a => console.log(a); | |
log({ | |
greeting: 'hi' | |
}); | |
const curry = x => ({ | |
logger: () => console.log(x) | |
}); | |
curry('hi').logger(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment