

MCQOPTIONS
Saved Bookmarks
This section includes 145 Mcqs, each offering curated multiple-choice questions to sharpen your Javascript knowledge and support exam preparation. Choose a topic below to get started.
51. |
What is the code snippet to change the class and let the stylesheet specify the details?%! |
A. | timestamp.className = "highlight"; |
B. | timestamp.className = "change"; |
C. | timestamp.className = "specify"; |
D. | timestamp.className = "move"; |
Answer» B. timestamp.className = "change"; | |
52. |
The language is commonly used to%! |
A. | Specify the user’s language |
B. | Specify the language going to be scripted |
C. | No longer in use |
D. | Specify the programmer’s favorable language |
Answer» D. Specify the programmer‚Äö√Ñ√¥s favorable language | |
53. |
Which is a useful way to try out small and simple Rhino programs and one-liners?%! |
A. | Starting an interative shell |
B. | Starting a one to one shell |
C. | Creating a thread to do simple programs |
D. | None of the mentioned |
Answer» B. Starting a one to one shell | |
54. |
Which of the following communicates with server-side CGI scripts through HTML form submissions and can be written without the use of JavaScript?%! |
A. | Static Web Pages |
B. | Interactive Web Pages |
C. | Conditional Web Pages |
D. | None of the mentioned |
Answer» C. Conditional Web Pages | |
55. |
What is the code for getting the current time?%! |
A. | now = new Date(); |
B. | var now = new Date(); |
C. | var now = Date(); |
D. | var now = new Date(current); |
Answer» C. var now = Date(); | |
56. |
Which is the in-house library of Yahoo!?%! |
A. | Dojo |
B. | YUI |
C. | Prototype |
D. | Closure |
Answer» C. Prototype | |
57. |
Which of the following is an event emitter?%! |
A. | once |
B. | process |
C. | listeners |
D. | on |
Answer» C. listeners | |
58. |
*$_Which is more widely used than GWT in Google?? |
A. | Closure |
B. | Dojo |
C. | Procedure |
D. | jQuery |
Answer» B. Dojo | |
59. |
*$_Which is the in-house library of Yahoo!?? |
A. | Dojo |
B. | YUI |
C. | Prototype |
D. | Closure |
Answer» C. Prototype | |
60. |
*$_Which of the following is an event emitter?? |
A. | once |
B. | process |
C. | listeners |
D. | on |
Answer» C. listeners | |
61. |
*$_Which Window object method is used to display message in a dialog box?? |
A. | alert() |
B. | prompt() |
C. | message() |
D. | none of the mentioned |
Answer» B. prompt() | |
62. |
*$_How to pick a document element based on the value of its id attribute?? |
A. | getElementsbyId() |
B. | getElementbyId() |
C. | both getElementsbyId() and getElementbyId() |
D. | none of the mentioned |
Answer» C. both getElementsbyId() and getElementbyId() | |
63. |
*$_Which handler is triggered when the content of the document in the window is stable and ready for manipulation?? |
A. | onload |
B. | manipulate |
C. | create |
D. | none of the mentioned |
Answer» B. manipulate | |
64. |
*$_What is the code snippet to change the class and let the stylesheet specify the details?? |
A. | timestamp.className = "highlight"; |
B. | timestamp.className = "change"; |
C. | timestamp.className = "specify"; |
D. | timestamp.className = "move"; |
Answer» B. timestamp.className = "change"; | |
65. |
*$_The language is commonly used to? |
A. | Specify the user’s language |
B. | Specify the language going to be scripted |
C. | No longer in use |
D. | Specify the programmer’s favorable language |
Answer» D. Specify the programmer‚Äö√Ñ√¥s favorable language | |
66. |
*/*_The new Java arrays can be created into a JavaScript programs using which of the following classes?? |
A. | java.Array |
B. | java.lang.* |
C. | java.lang.Array |
D. | java.lang.reflect.Array |
Answer» E. | |
67. |
*/*_Which is a useful way to try out small and simple Rhino programs and one-liners?? |
A. | Starting an interative shell |
B. | Starting a one to one shell |
C. | Creating a thread to do simple programs |
D. | None of the mentioned |
Answer» B. Starting a one to one shell | |
68. |
*/*_What will be the return value of the write() method when the Node cannot write the data immediately and has to buffer it internally?? |
A. | 0 |
B. | 1 |
C. | True |
D. | False |
Answer» E. | |
69. |
*/*_Which of the following communicates with server-side CGI scripts through HTML form submissions and can be written without the use of JavaScript?? |
A. | Static Web Pages |
B. | Interactive Web Pages |
C. | Conditional Web Pages |
D. | None of the mentioned |
Answer» C. Conditional Web Pages | |
70. |
*/*_The HTML5 specification includes? |
A. | Data storage |
B. | Graphics APIs |
C. | Other APIs for web apps |
D. | All of the mentioned |
Answer» E. | |
71. |
*/*_Which is the method used for registering handlers?? |
A. | on() |
B. | register() |
C. | add() |
D. | include() |
Answer» B. register() | |
72. |
*/*_What is the command used for debugging output in Node?? |
A. | print(); |
B. | console.log(…); |
C. | debug(…); |
D. | execute(…); |
Answer» C. debug(‚Äö√Ѭ∂); | |
73. |
*/*_What is the code for getting the current time?? |
A. | now = new Date(); |
B. | var now = new Date(); |
C. | var now = Date(); |
D. | var now = new Date(current); |
Answer» C. var now = Date(); | |
74. |
*/*_Which Rhino command quits Rhino environment?? |
A. | terminate() |
B. | exit() |
C. | quit() |
D. | close() |
Answer» D. close() | |
75. |
*/*_What is the default value of the type attribute?? |
A. | text/css |
B. | text/javascript |
C. | text |
D. | xml |
Answer» C. text | |
76. |
*/*_Which property in the Window object is used to refer to a Location object?? |
A. | position |
B. | area |
C. | window |
D. | location |
Answer» E. | |
77. |
*/*_Which is the property that represents the content displayed in the window?? |
A. | document |
B. | content |
C. | window |
D. | frame |
Answer» B. content | |
78. |
*/*_What is the purpose of the event handlers in the JavaScript?? |
A. | Adds innerHTML page to the code |
B. | Performs handling of exceptions and occurences |
C. | Allows JavaScript code to alter the behaviour of windows |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
79. |
*/*_Which of the following is not an object?? |
A. | Element |
B. | Location |
C. | Position |
D. | Window |
Answer» D. Window | |
80. |
*/*_What is the programming philosophy that argues that content and behaviour should as much as possible be kept separate?? |
A. | Unobtrusive JavaScript |
B. | Obtrusive JavaScript |
C. | Inherited JavaScript |
D. | Modular JavaScript |
Answer» B. Obtrusive JavaScript | |
81. |
*/*_The service(s) that enables networking through scripted HTTP requests is? |
A. | XMLHttpResponse |
B. | XMLRequest |
C. | XMLHttpRequest |
D. | All of the mentioned |
Answer» D. All of the mentioned | |
82. |
*/*_Why does Node not block while waiting for operations to complete?? |
A. | Static |
B. | Asynchronous |
C. | Synchronous |
D. | None of the mentioned |
Answer» C. Synchronous | |
83. |
*/*_What is the alternative command used in Node for load()?? |
A. | store() |
B. | module() |
C. | log() |
D. | require() |
Answer» E. | |
84. |
*/*_The JavaScript classes can be instantiated using _____ operator?? |
A. | create |
B. | new |
C. | instantiate |
D. | create.new |
Answer» C. instantiate | |
85. |
*/*_Which is the root element in a HTML document?? |
A. | HTML |
B. | HEAD |
C. | SCRIPT |
D. | BODY |
Answer» B. HEAD | |
86. |
*/*_Which of the following is a web application API framework?? |
A. | Dojo |
B. | YUI |
C. | GWT |
D. | All of the mentioned |
Answer» D. All of the mentioned | |
87. |
%_Which of the following is a web application API framework?_% |
A. | Dojo |
B. | YUI |
C. | GWT |
D. | All of the mentioned |
Answer» D. All of the mentioned | |
88. |
%_What is the purpose of Dojo framework?_% |
A. | Focuses on DOM and Ajax utilities |
B. | Advertises incredible depth |
C. | Ajax utilities |
D. | None of the mentioned |
Answer» C. Ajax utilities | |
89. |
%_Which function is a synonym for on()?_% |
A. | addListener() |
B. | listeners() |
C. | once() |
D. | add() |
Answer» B. listeners() | |
90. |
_ Which property in the Window object is used to refer to a Location object?$? |
A. | position |
B. | area |
C. | window |
D. | location |
Answer» E. | |
91. |
_ Which is the property that represents the content displayed in the window?$? |
A. | document |
B. | content |
C. | window |
D. | frame |
Answer» B. content | |
92. |
_ What is the purpose of the event handlers in the JavaScript?$? |
A. | Adds innerHTML page to the code |
B. | Performs handling of exceptions and occurences |
C. | Allows JavaScript code to alter the behaviour of windows |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
93. |
_ Which of the following is not an object?$? |
A. | Element |
B. | Location |
C. | Position |
D. | Window |
Answer» D. Window | |
94. |
_ What is the default value of the type attribute?$? |
A. | text/css |
B. | text/javascript |
C. | text |
D. | xml |
Answer» C. text | |
95. |
__The JavaScript classes can be instantiated using _____ operator?__ |
A. | create |
B. | new |
C. | instantiate |
D. | create.new |
Answer» C. instantiate | |
96. |
__Which Rhino command quits Rhino environment?__ |
A. | terminate() |
B. | exit() |
C. | quit() |
D. | close() |
Answer» D. close() | |
97. |
__When the “end” event fires on EOF when no more data will arrive, which function is called?__ |
A. | s.on("data",f); |
B. | s.on("end",f); |
C. | s.on("error",f); |
D. | s.on("default",f); |
Answer» C. s.on("error",f); | |
98. |
__What is the programming philosophy that argues that content and behaviour should as much as possible be kept separate?__ |
A. | Unobtrusive JavaScript |
B. | Obtrusive JavaScript |
C. | Inherited JavaScript |
D. | Modular JavaScript |
Answer» B. Obtrusive JavaScript | |
99. |
__The service(s) that enables networking through scripted HTTP requests is__ |
A. | XMLHttpResponse |
B. | XMLRequest |
C. | XMLHttpRequest |
D. | All of the mentioned |
Answer» D. All of the mentioned | |
100. |
__Why does Node not block while waiting for operations to complete?__ |
A. | Static |
B. | Asynchronous |
C. | Synchronous |
D. | None of the mentioned |
Answer» C. Synchronous | |