1.

How can you create a node for comment in JavaScript?(a) comment()(b) createComment()(c) comm()(d) create()I got this question at a job interview.Query is from JavaScript Benchmarking and Logging with perfLogger topic in section Parsing, Benchmarking and Logging of JavaScript

Answer»

Right answer is (b) createComment()

For explanation: The COMMENT node can be created using the method Comment createComment(STRING data). The createComment() method CREATES a Comment node with the SPECIFIED TEXT.



Discussion

No Comment Found

Related InterviewSolutions