Created
October 27, 2018 14:13
-
-
Save glennreyes/201e0f154bd45a1ff8d0480bd66b4ee9 to your computer and use it in GitHub Desktop.
This file contains 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 say = (str) => { | |
let result = str; | |
const next = (nextStr) => { | |
if (!nextStr) return result | |
result += ` ${nextStr}`; | |
return next | |
} | |
return next | |
}; | |
console.log(say('Hello')('World')()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment