Imagine a situation where you need to loop through a constant array. Is there a distinction between
[...arr].forEach((elem) => {
// your operations
});
and
arr.forEach((elem) => {
// your operations
});
Are these two methods interchangeable?