let arr = [10,20,30,40,50]; arr.pop(); console.log(arr); // => [10,20,30,40]
<ul id="menu"> <li>Home</li> <li>Products</li> <li>About Us</li> </ul> let menu = document.getElementById('menu'); menu.removeChild(menu.lastElementChild);