modify an array javascript code example
Example 1: modify array js
let newArray = oldArray.map(funcToEachElem);
Example 2: js array modify element
people[0] = "Georgie";
Example 3: how to modify an array
let browsers = ['chrome', 'firefox', 'edge'];
browsers.shift(); // "chrome"
console.log(browsers); // ["firefox", "edge"]