ExamVeda
Login
Home
61
What is the code to be used to trim whitespaces ?
Discuss
Answer & Solution
Answer: Option A
Solution:
We can use the above code to trim whitespaces and filter out comments and blank lines.
62
What will be the reaction when a catch clause has no conditionals ?
Discuss
Answer & Solution
Answer: Option C
Solution:
If a catch clause has no conditional, it behaves as if it has the conditional if true, and it is always triggered if no clause before it was triggered.
63
When will the finally block be called?
Discuss
Answer & Solution
Answer: Option D
Solution:
A finally block is called after try-catch execution.
64
What is the return type of typeof for standard JavaScript objects?
Discuss
Answer & Solution
Answer: Option B
Solution:
The typeof operator returns “object” for all standard JavaScript objects as functions are, and the typeof operator returns “xml”.
65
Which method to use while working with XML fragments, instead of XML()?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
66
Which of the following is the descendant operator?
Discuss
Answer & Solution
Answer: Option B
Solution:
The .. operator is the descendant operator; you can use it in place of the normal . member-access operator :
var names = pt..name;
67
Which of the following is an example to perform the most common XML manipulations using the XML objects invocation?
Discuss
Answer & Solution
Answer: Option A
Solution:
E4X is designed so that you can perform most common XML manipulations using language syntax. E4X also defines methods you can invoke on XML objects. Here, for example, is the insertChildBefore() method:
68
What is the code required to delete all “weight” tags?
Discuss
Answer & Solution
Answer: Option D
Solution:
Removing attributes and tags is very easy with the standard delete operator :
delete pt..weight; //delete all  tags