Home »
MCQs »
jQuery MCQs
What is the difference between remove() and empty() methods?
72. What is the difference between remove() and empty() methods?
- remove() removes the selected element and its child elements while empty() removes the child elements of the selected element
- remove() removes the child elements of the selected element while empty() removes the selected elements and its child elements
- remove() removes the child elements while empty() removes the content of the selected element
- remove() removes the child elements while empty() removes the content of the selected element and its child elements
Answer: A) remove() removes the selected element and its child elements while empty() removes the child elements of the selected element
Explanation:
The difference between remove() and empty() methods is: remove() removes the selected element and its child elements while empty() removes the child elements of the selected element.