4 ms·
As long as the constructor doesn't take multiple arguments [1], otherwise: [1, 2, 3].map(id => User(id)) [1] http://speakingjs.com/es5/ch15.html#_pitfall_
by insin 12y ago
As long as the constructor doesn't take multiple arguments [1], otherwise:
[1, 2, 3].map(id => User(id))
[1] http://speakingjs.com/es5/ch15.html#_pitfall_unexpected_optional_parameters http://speakingjs.com/es5/ch15.html#_pitfall_unexpected_opti...