

MCQOPTIONS
Saved Bookmarks
This section includes 14 Mcqs, each offering curated multiple-choice questions to sharpen your Javascript knowledge and support exam preparation. Choose a topic below to get started.
1. |
Consider the following code snippet :
|
A. | 10 |
B. | 9 |
C. | 0 |
D. | All of above |
E. | None of these |
Answer» B. 9 | |
2. |
Consider the following code snippet :
|
A. | Undefined |
B. | Null |
C. | 0 |
D. | 1 |
E. | None of these |
Answer» E. None of these | |
3. |
What is the difference between the two lines given below ?
|
A. | Both the lines checks just for the existence of the object alone |
B. | The first line results in a real boolean value whereas the second line merely checks for the existence of the objects |
C. | Both the lines result in a boolean value False |
D. | Both the lines result in a boolean value True |
E. | None of these |
Answer» C. Both the lines result in a boolean value False | |
4. |
For the below mentioned code snippet:
|
A. | Object obj=new Object(); |
B. | var obj= new Object; |
C. | var obj; |
D. | var obj = Object(); |
E. | None of these |
Answer» C. var obj; | |
5. |
Consider the following code snippet :
|
A. | 456pqr |
B. | Exception |
C. | NaN |
D. | 456 |
E. | None of these |
Answer» E. None of these | |
6. |
Consider the following code snippet :
|
A. | Memory leak |
B. | Exception will be thrown |
C. | Error |
D. | Yes |
E. | None of these |
Answer» E. None of these | |
7. |
Consider the following code snippet :
|
A. | 35 as an integer value |
B. | 35 as a string |
C. | Exception is thrown |
D. | 5*5+10 |
E. | None of these |
Answer» B. 35 as a string | |
8. |
Consider the following code snippet
|
A. | opt.fun(p && q); |
B. | opt(fun)["p","q"]; |
C. | opt.fun(p) && opt.fun(q); |
D. | opt["fun"](p,q); |
E. | None of these |
Answer» E. None of these | |
9. |
Consider the following code snippet
|
A. | prints only one property |
B. | Prints the contents of each property of n |
C. | prints the address of elements |
D. | Returns undefined |
E. | None of these |
Answer» E. None of these | |
10. |
Consider the following code snippet
|
A. | Square of sum of p and q |
B. | Sum of p and q square |
C. | Sum of square of p and q |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
11. |
Which is an equivalent code to invoke a function fun of class opt that expects two arguments p and q? |
A. | opt.fun(p,q); |
B. | fun(p,q); |
C. | opt.fun(p) && opt.fun(q); |
D. | opt(p,q); |
E. | None of these |
Answer» B. fun(p,q); | |
12. |
What is the difference between the two lines given below ? |
A. | Both the lines checks just for the existence of the object alone |
B. | The first line results in a real boolean value whereas the second line merely checks for the existence of the objects |
C. | Both the lines result in a boolean value False |
D. | Both the lines result in a boolean value True |
E. | None of these |
Answer» C. Both the lines result in a boolean value False | |
13. |
Consider the following code snippet : |
A. | Undefined |
B. | Null |
C. | 0 |
D. | 1 |
E. | None of these |
Answer» E. None of these | |
14. |
For the below mentioned code snippet: |
A. | Object obj=new Object(); |
B. | var obj= new Object; |
C. | var obj; |
D. | var obj = Object(); |
E. | None of these |
Answer» C. var obj; | |