- Joined
- Oct 11, 2015
- Messages
- 424
- Reaction score
- 171
- First Language
- Dutch
- Primarily Uses
- RMMV
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.
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.
Last edited by a moderator:



