Created
May 20, 2016 19:34
-
-
Save daronwolff/20b38e0ae1df0d01ef71aa150c4d4a5a to your computer and use it in GitHub Desktop.
Write a function that takes an argument and returns a function that returns that argumen
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
"use strict"; | |
function identify(x) { | |
return function(){ | |
return x; | |
} | |
} | |
var idf = identify(3); | |
idf(); // 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment