Метод RemoveChild ()

const groceryList = document.getElementById('groceryList');
const iceCream = document.getElementById('iceCream');
 
groceryList.removeChild(iceCream);
Douglas Stemple