1.

Which of the following are static methods in JavaScript?(a) Date.parse()(b) Date.UTC()(c) Both Date.parse() and Date.UTC()(d) Date.clear()

Answer» Correct answer is (c) Both Date.parse() and Date.UTC()

To explain I would say: Date objects are created with the new Date() constructor. Date.parse() parses a string representation of a date and time and returns the internal millisecond representation of that date. Date.UTC() Returns the millisecond representation of the specified UTC date and time.


Discussion

No Comment Found

Related InterviewSolutions