4 ms·
Or the alternative : [1,2,3].map( function(i) { return new User(i); } ); might seem more reasonable in the JS world.
by drinchev 12y ago
Or the alternative :
[1,2,3].map( function(i) { return new User(i); } );
might seem more reasonable in the JS world.
- agumonkey 12y agoIt's a valuable but unnecessary intermediate step if you go into functional idioms (map, fold, closures) fully. raganwald books cover this way of using javascript https://leanpub.com/u/raganwald https://leanpub.com/u/raganwald