Lamda not allowed in RM?

var test = [2, 5, 8, 1, 4].some(f => f === 11); // error, unexpected token =>Has it to do with the JavaScript version being used in RM or something or why can't we used lambda's? They shorten code so nicely.

Other options are (but are longer):

var test = [2, 5, 8, 1, 4, 11].some(function (effect) { return effect == 11; } )And lastly you can obviously loop through it with a for-loop, being the most ugly solution.
Arrow functions are new feature in ES6, while RMMV is using ES5 standard 🙂
Use anonymous functions:

Code:
var test = [2, 5, 8, 1, 4].some(function(e) { return e > 10; });
<sorry double post>
Arrow functions are new feature in ES6, while RMMV is using ES5 standard 🙂
;_;

Use anonymous functions:

var test = [2, 5, 8, 1, 4].some(function(e) { return e > 10; });
Yeah you ninja-ed my edit 😛 . Yeah that's what I do now. Would prefer lambda though like in C#. I love lambda. But this is acceptable.
MV uses Chrome 42, as that's what was available from NWJS at the time MV was in development (and, at the time of writing this, the version shipping with MV is still the latest stable release available, but a new one is in the works with a newer version of Chrome). You'll have to wait for an updated version of Chrome to be released with NWJS that supports ore ES6 features.

Original thread: https://forums.rpgmakerweb.com/threads/lamda-not-allowed-in-rm.53447/