41.Which of the following is true?
42. Syntax for creating a RegExp object:
1. var txt=new RegExp(pattern,attributes);
2. var txt=/pattern/attributes;
Which of the above mentioned syntax will correct?
Explanation: Both the statement are correct.
Both the syntax can be used for creating a RegExp object.
43. If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?
Explanation: the correct syntax to change the text within the paragraph is "para1.value="New Text";"
44. The syntax of Eval is ________________
45. The _______ method of an Array object adds and/or removes elements from an array.
Explanation:The splice() method returns the removed item(s) in an array and slice() method returns the selected element(s) in an array, as a new array object
46. Which tag(s) can handle mouse events in Netscape?
Explanation:The img element can handle mouse events in Netscape.
47. Consider the following code snippet
What will be the output for the above code snippet?
Explanation: Const keyword fixes the value of the variable. Const keyword can not be redefined. Therefore attempts to alter the value or re-declaration causes errors.
48. What is the default value of the asyc attribute?
Explanation: The async attribute is a boolean attribute. When present, it specifies that the script will be executed asynchronously as soon as it is available. The async attribute optionally accepts a boolean value and by default holds the value true.
49. What is the purpose of the Attr object in the HTML DOM?
Explanation: In the HTML DOM, the Attr object represents an HTML attribute.
50. Which among the following POSIX signals generate events?
Explanation:The SIGINT is a POSIX signal that generates event. A simple code like below can do a proper clean up and exit on CTRL-C or SIGINT passed from command line / other application to the nodejs app’s ProcessID.
Also check :