-
-
Save allouis/87be8d2a9231b4da5178 to your computer and use it in GitHub Desktop.
_ wildcard 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
var _ = new Proxy({}, { | |
get: function get(target, property) { | |
return function f(x) { | |
return x[property](); | |
} | |
} | |
}); | |
["some", "words"].map(_.toUpperCase); // => ["SOME", "WORDS"]; |
benji6
commented
Aug 17, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment