// reassigning the parameter rebinds the LOCAL name only
function replace(items: number[]): number[] {
items = [9, 9, 9];
return items;
}
const nums = [1, 2, 3];
const out = replace(nums);
console.log(nums, out);rebinding a parameter stays local