Learn, grow and help others with BBBootstrap
Contribute us with some awesome cool snippets using HTML,CSS,JAVASCRIPT and BOOTSTRAP
![](https://i.imgur.com/dnN38NC.jpg)
We can remove elements that were fetched using querySelectorAll
by iterating through the NodeList and calling the remove()
method on each element. Here is an example:
// Fetch the elements to remove const elements = document.querySelectorAll('.class-name'); // Iterate through the elements and remove them elements.forEach(element => { element.remove(); });