Guys i am sorry to ask this. Maybe a easy one but i am new at this language.
let arr =[1,2,3,4,5,6];
arr.forEach(a => a++);
console.log(arr);
why doesn't this work?
let arr =[
{name:"a"},
{name:"b"},
{name:"c"}
];
arr.forEach(a => a.name = "d");
console.log(arr);
but this works?