Duplicating an array
The alternative approaches in the comments return arr.concat(arr); and return [...arr, ...arr]; are good replacements.

However, if you wrote this as part of a course, you should consider the following:


Your indentation is off, this is rule 1 in writing code: indent it
You are missing a semicolon after copy.push(arr[i])
In such a small function, I would have declared i up top in that let statement