Last active
August 15, 2017 05:50
-
-
Save astfarias/4e63866d72eecc405385e5f7516e09ba to your computer and use it in GitHub Desktop.
JS - Functional Programming - Using JS Functions as Value
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
// Using Function JS as a Value | |
var triple = function ( x ) { | |
return x * 3 | |
} | |
var waffle = triple | |
waffle(3) // 9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment