remove function in not working in java script why [closed]

I am getting problems with removing a id that is in an HTML page and I am removing it from javascript

with remove function and its working giving errors

document.getElementbyId(‘id-name”).remove();
give’s typeError on chrome browser

i tryed removechild(element)
and remove(element);
removechild(element);