ExamVeda
Login
Home
11
What is the function of the XML parser?
Discuss
Answer & Solution
Answer: Option A
Solution:
An XML parser converts an XML document into an XML DOM object – which can then be manipulated with JavaScript.
12
What is the purpose of the method ActiveXObject()?
Discuss
Answer & Solution
Answer: Option C
Solution:
The ActiveXObject() object is used only to instantiate Automation objects, and has no members.
13
What is the purpose of the url json?
Discuss
Answer & Solution
Answer: Option B
Solution:
The URL JSON is assumed to reference a file of JSON-formatted data. The value passed to the callback is the object obtained by parsing the URL contents with jQuery.parseJSON(). jQuery.getJSON() uses this type. If the type is “json” and the URL or data string contains “=?”, the type is converted to “jsonp”.
14
What is the parameter of the method Date.parse()?
Discuss
Answer & Solution
Answer: Option C
Solution:
The parse method is defined as Date.parse(datestring).
15
Which is the function in JavaScript that will print the current page in JavaScript?
Discuss
Answer & Solution
Answer: Option A
Solution:
The window.print() can be used to print the current page in JavaScript.
16
To which of the following object does the print() method belong to?
Discuss
Answer & Solution
Answer: Option A
Solution:
The method print() belongs to the window object.
17
What will happen if the radix parameter of the parseInt() function is omitted?
Discuss
Answer & Solution
Answer: Option A
Solution:
If the radix parameter is omitted, JavaScript assumes the following:
1. If the string begins with “0x”, the radix is 16 (hexadecimal)
2. If the string begins with “0”, the radix is 8 (octal). This feature is deprecated
3. If the string begins with any other value, the radix is 10 (decimal)
18
What will be the radix value if the string begins with 0x?
Discuss
Answer & Solution
Answer: Option D
Solution:
If the string begins with 0x, then the radix value will be 16.
19
What is the function of the parseInt() method?
Discuss
Answer & Solution
Answer: Option B
Solution:
The function parseInt() method parses a string and returns an integer.
20
What does it indicate when the radix value is 16?
Discuss
Answer & Solution
Answer: Option A
Solution:
If the string begins with “0x”, the radix is 16 (hexadecimal).