I want to change the current object in for each loop and it does not work, Why it is not working and how can i do this?
var arr = [{num: 1}, {num: 2}]; arr.
Another variety to the list of answers
var arr = [{num: 1}, {num: 2}]; arr.forEach(function(item) { item.something = 2;//setting the value delete item.num;//deleting the num from the object });