ExamVeda
Login
Home
11
What is the purpose of the Math method toSource()?
Discuss
Answer & Solution
Answer: Option A
Solution:
The method Math.toSource() returns the string “Math”. But this method does not work with many browsers like IE.
12
How many static methods does a Date object have?
Discuss
Answer & Solution
Answer: Option D
Solution:
The Date object defines two static methods namely Date.parse() and Date.UTC().
13
Which of the following are static methods in JavaScript?
Discuss
Answer & Solution
Answer: Option C
Solution:
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.
14
If we have an object r and want to know if it is a Range object, we can write:
Discuss
Answer & Solution
Answer: Option D
Solution:
The r instanceof Range returns true if r inherits from Range.prototype. The instanceof operatory does not actually check whether r was initialized by the Range constructor.
15
What is the property to access the first child of a node?
Discuss
Answer & Solution
Answer: Option D
Solution:
The first child of a node can be accessed using the firstChild property.
16
Which of the following is not an object?
Discuss
Answer & Solution
Answer: Option C
Solution:
There is no object called Position.
17
What is the code snippet to change the class and let the stylesheet specify the details?
Discuss
Answer & Solution
Answer: Option A
Solution:
The above code snippet changes the class and lets the stylesheet specify the details.