Testing the results for the fastest approach of shallow copying an array in JavaScript (concat, slice, for loop, and while loop).
Comparing performance of:Array.concat vs Array.slice vs For loop vs For loop with declared length vs While loop vs Spread operator vs Slice with begin argument vs Slice with begin and end argument vs Array.from