

MCQOPTIONS
Saved Bookmarks
This section includes 15 Mcqs, each offering curated multiple-choice questions to sharpen your Html knowledge and support exam preparation. Choose a topic below to get started.
1. |
What is the Boolean value of “” in JavaScript? |
A. | true |
B. | on |
C. | off |
D. | false |
Answer» E. | |
2. |
Math.random() returns _______________ |
A. | random number between 0 and 1 |
B. | random number between 1 and 10 |
C. | random number between 1 and 100 |
D. | random number between 0 and 10 |
Answer» B. random number between 1 and 10 | |
3. |
Which method is not used for converting variables to number? |
A. | parseInt() |
B. | Number() |
C. | parseFloat() |
D. | valueOf() |
Answer» E. | |
4. |
By default JavaScript displays the numbers as ___________ |
A. | base 16 |
B. | base 10 |
C. | base 6 |
D. | base 2 |
Answer» C. base 6 | |
5. |
Typeof “infinity” will return ___________ |
A. | string |
B. | number |
C. | object |
D. | undefined |
Answer» C. object | |
6. |
The integers in JavaScript are precise up to ___________ |
A. | 12 digits |
B. | 10 digits |
C. | 23 digits |
D. | 15 digits |
Answer» E. | |
7. |
JavaScript numbers are stored as ______________ |
A. | integers |
B. | double precision floating point |
C. | double |
D. | floating point |
Answer» C. double | |
8. |
For converting string to array we can use ______________ method. |
A. | charAt() |
B. | charCodeAt() |
C. | split() |
D. | toLowerCase() |
Answer» D. toLowerCase() | |
9. |
Negative positions for string do not work in ______________ |
A. | Internet Explorer 8 |
B. | Chrome |
C. | Safari |
D. | Opera |
Answer» B. Chrome | |
10. |
typeof “null” in JavaScript is _______ |
A. | number |
B. | string |
C. | object |
D. | undefined |
Answer» D. undefined | |
11. |
Arrays in JavaScript are written within ____________ |
A. | {} |
B. | []. |
C. | “” |
D. | () |
Answer» C. “” | |
12. |
Which of the following keyword stops the execution of JavaScript? |
A. | break |
B. | return |
C. | debugger |
D. | try….catch |
Answer» D. try….catch | |
13. |
For testing we should use ________ |
A. | document.write() |
B. | console.log() |
C. | window.alert() |
D. | innerHTML |
Answer» B. console.log() | |
14. |
For displaying data in JavaScript, we can’t use ____________ |
A. | document.write() |
B. | console.log() |
C. | innerHTML |
D. | document.getElementById() |
Answer» E. | |
15. |
External scripts can’t take the tag _________ |
A. | <script> |
B. | <form> |
C. | <h1> |
D. | <title> |
Answer» B. <form> | |