3 ms·
OK, so i'll make a concat function which uses push under the hood. Best of both worlds.
by revskill 7y ago
OK, so i'll make a concat function which uses push under the hood. Best of both worlds.
- Izkata 7y agoArray.splice would probably be better (specify adding to the end of the array and deleting 0 elements); it modifies in-place like push.
- darepublic 7y agoThey do different things so it's more like the worst of all worlds.