1.

What does the appendChild() method perform?(a) Appends a node in the middle of the index taken as the parameter(b) Appends a node as the first child(c) Appends a node as the last child(d) Replaces and appends at the last nodeThe question was posed to me in an interview.The origin of the question is Lazy Loading in chapter Invocation and Performance Navigation of JavaScript

Answer»

The correct answer is (c) Appends a node as the LAST CHILD

The best explanation: The appendChild() method appends a node as the last child of a node. You can also use this method to move an element from ONE element to another.



Discussion

No Comment Found

Related InterviewSolutions