is there any way to map the λ key to the function keyword? so that these work:
var rFalse = λ() {
return false;
}
(λ(){
var str = "i'm in a closure";
}());
window.onload = λ() {
alert('window loaded');
}
I know that they are attempting to put a shortened function keyword in ecmascript v6, but I'm wondering if it is possible to do it now.
JavaScript does not offer aliasing of keywords, so it is not possible make the syntax you're trying to use valid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With