3 ms·
Wouldn't a call to Array.prototype.splice act as a language defined (and hopefully optimized) means of adding elements in-place? Slightly ugly because you'd ne
by scj 7y ago
Wouldn't a call to Array.prototype.splice act as a language defined (and hopefully optimized) means of adding elements in-place?
Slightly ugly because you'd need to specify the start index, a command to delete 0 elements, and a call/apply to inject the array, but it should do.