because you are not providing it when you invoke the function
thus you end up using the spread operator on undefined. If you don’t pass it in, arr1 in the expression [...arr1] points to the global variable on line 1 (which is why it has the only change this line comment). If you did want arr1 to be a parameter, you could pass it when the function is invoked.
const arr1 = ['JAN', 'FEB', 'MAR', 'APR', 'MAY'];
arr2 = [...arr1]; // change this line