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