Report Bug
Qus :

What will the following JavaScript code do?

var element = document.getElementById("myDiv");
element.remove();

Qus

निम्नलिखित जावास्क्रिप्ट कोड क्या करेगा?

var element = document.getElementById("myDiv");
element.remove();


A. Remove the element with the ID "myDiv" from the DOM
B. Remove all child elements inside the element with the ID "myDiv"
C. Hide the element with the ID "myDiv"
D. Move the element with the ID "myDiv" to a different location


Solution
A. Remove the element with the ID "myDiv" from the DOM






Report Bug