Map, Reduce and functional scripting
Hi all,
I've been writing scripts and was refactoring some code to utilize functional methods like (map, reduce, filter).
It appears that these are completely unsupported. Is this true? I couldn't find any confirmation either way, only that they appear not to work. I can't imagine why this would be the case.
Here is a trivial example of a script that fails to run:
var x = [4,9,16];
var y = x.map(Math.sqrt);
alert(y);
I get the following error: "x.map is not a function".
Best wishes,
Jake
