Hi.
How do I do something like this (just an example) ...
[1,2,3].each(function(val){return val * val;});
such that the result is ...
[1,4,9]
It seems each() is returning the original value and not the calculation.
The full code is ...
$$('#cbGridContainer
On 17.9.2010, at 15.03, Richard Quadling wrote:
Hi.
How do I do something like this (just an example) ...
[1,2,3].each(function(val){return val * val;});
such that the result is ...
[1,4,9]
[1,2,3].map(function(i){ return i * i }); //
On 17 September 2010 13:26, Jarkko Laine jar...@jlaine.net wrote:
On 17.9.2010, at 15.03, Richard Quadling wrote:
Hi.
How do I do something like this (just an example) ...
[1,2,3].each(function(val){return val * val;});
such that the result is ...
[1,4,9]
[1,2,3].map(function(i){