You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Create the array and assign it valuesvar colors = ['white', 'black', 'custom'];// Update the third item in the arraycolors[2] = 'beige';// Get the element with an id of colorsvar el = document.getElementById('colors');// Replace element with third item from the arrayel.textContent = colors[2];/* NOTE: textContent does not work in IE8 or earlierYou can use innerHTML on line 10, but note the security issues on p228-231el.innerHTML = colors[2];*/