I was trying to run removechild
on this HTML code:
But it gives me this error
Uncaught TypeError: Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'.
let list = document.getElementById("cont");
list.removeChild(document.getElementById("heading"));
<div class="container" id="cont">
<h1 id="heading">Hello</h1>
<h1>World</h1>
</div>