JSFiddle - React, Tailwind, and code Playground
JavaScript
a = [{a:1}, {a:2}, {a:3}];
for (let num of a) {
num.a++;
}
console.log(a); // [{a:2}, {a:3}, {a:4}];
a = [{a:1}, {a:2}, {a:3}];
for (let num of a) {
num.a++;
}
console.log(a); // [{a:2}, {a:3}, {a:4}];