JavaScript Tutorial For Beginners #38 – Removing Elements from the DOM




Hey guys, in the last JS tutorial I showed you how to insert new HTML elements into the DOM. In this lesson, I’ll show you how to remove elements from the DOM!

We can remove elements from the DOM in JavaScript via the removeChild() method.

If you have any questions, fire away 🙂

SUBSCRIBE TO CHANNEL – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg?sub_confirmation=1

========== JavaScript for Beginners Playlist ==========

========== CSS for Beginners Playlist ==========

========== HTML for Beginners Playlist ==========

========== The Net Ninja ============

For more front-end development tutorials & to black-belt your coding skills, head over to – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg or http://thenetninja.co.uk

========== Social Links ==========

Twitter – @TheNetNinja – https://twitter.com/thenetninjauk

Original source


15 responses to “JavaScript Tutorial For Beginners #38 – Removing Elements from the DOM”

  1. VM1888:1 Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
    at <anonymous>:1:18. I am getting that message when i try to removeChild or even to add new <li> on the top of <ul> . What am I doing wrong ?

Leave a Reply