Created
January 5, 2017 21:25
-
-
Save casprwang/f8b955cc67396350db0071c229d63493 to your computer and use it in GitHub Desktop.
invoke a function by letting the function in
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
const a = x => console.log(x); | |
a(() => console.log('h1')); | |
// create a function on the fly | |
console.log(() => console.log('this is stupid')); | |
const b = x => x(); | |
b(() => console.log('this is even stupier')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment