const replace = (items) => { // rebinding the local name breaks the link to the caller items = [9, 9, 9]; return items; }; const nums = [1, 2, 3]; const out = replace(nums); console.log(nums, out);
reassigning a parameter is not seen outside