Last active
January 3, 2016 04:29
-
-
Save christiantakle/8409518 to your computer and use it in GitHub Desktop.
A function that illustrates closures and higher-order functions in JavaScript
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
//-- If you understand closures - you know why this will always return true | |
function f(value) { | |
return (function (copy) { | |
return copy === value; | |
}(value)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment