Olete.in
Articles
Mock Tests
🧪 JavaScript MCQ Quiz Hub
JavaScript MCQ Questions And Answers Set 2
Choose a topic to test your knowledge and improve your JavaScript skills
1. "<script type=""text/javascript""> x=4+""4""; document.write(x); </script> Output------?"
44
8
4
Error output
2. Scripting language are
High Level Programming language
Assembly Level programming language
Machine level programming language
None of the above
3. Which best explains getSelection()?
Returns the VALUE of a selected OPTION.
Returns document.URL of the window in focus.
Returns the value of cursor-selected text
Returns the VALUE of a checked radio input.
4. Choose the client-side JavaScript object:
Database
Cursor
Client
FileUpLoad
5. What is mean by "this" keyword in javascript?
It refers current object
It referes previous object
It is variable which contains value
None of the above
6. <script language="javascript"> function x() { document.write(2+5+"8"); } </script>
258
Error
7
78
7. <script type="text/javascript"> var s = "9123456 or 80000?"; var pattern = /d{4}/; var output = s.match(pattern); document.write(output); </script>
9123
91234
80000
None of the above
Submit