Answers for "What is the proper way to empty DIV tag?"

0

What is the proper way to empty DIV tag?

const div = document.querySelector('#my-div');
[].slice.call(div.children).forEach(child => div.removeChild(child))
Posted by: Guest on June-24-2021

Code answers related to "What is the proper way to empty DIV tag?"

Code answers related to "Javascript"

Browse Popular Code Answers by Language