Kiran wants to remove all the child nodes from the given div element. Help him to select the correct option to remove all the child node from the div element. <body> <div> This is some text <h2>Good morning</h2> <p>This is a paragraph inside the div.</p> </div> <p>This is a paragraph outside the div.</p> </body>
Answer options
A
True
B
False
Correct answer: True
Explanation
Quick AnswerThe correct answer is True because it directly addresses the core logic of Web Technology.
jQuery's .empty() method removes all child nodes and content from the selected element while keeping the element itself. Use .remove() to delete the element and its children entirely.