Last active
May 11, 2017 19:56
-
-
Save Woodsphreaker/1b5ba9560e9eb8ac16ada5ff2360c0f7 to your computer and use it in GitHub Desktop.
revealing.js
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 myApp = (() => { | |
const message = (msg) => msg; | |
const plus = (a) => (b) => message(`Resultado da Soma ${a} + ${b} é ${a + b}`); | |
const double = (a) => (b) => message(`Resultado da Multiplicação ${a} * ${b} é ${a * b}`) | |
return { | |
plus, | |
double | |
}; | |
})(); | |
const soma10 = myApp.plus(10); | |
console.log(soma10(30), soma10(60)); | |
const multiplica2 = myApp.double(2); | |
console.log(multiplica2(10), multiplica2(100)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment