Hacker News new | ask | show | jobs
by spicebox 1123 days ago
Spreading an array requires looping over all the array elements which is O(n) compared to something like Array.push() which is just 0(1), although spreading has other benefits like copying rather than mutating