21. What are the types of Pop up boxes available in JavaScript?
- Confirm
- Alert
- Prompt
- All of the above
Answer : D Explanation: JavaScript offers different types of pop up boxes including confirm, alert and prompt.
22. The property of the JSON( ) method is:
- it will be automatically invoked by the compiler
- it is invoked automatically by the JSON.stringify() method
- it can be invoked manually as object.JSON()
- it cannot be invoked in any form
Answer : B Explanation: The JSON format is intended for the serialization of data structures and can handle JavaScript primitive values, arrays, and plain objects. It does not know about classes, and when serializing an object, it ignores the object’s prototype and constructor. If you call JSON.stringify() on a Range or Complex object, for example, it returns a string like {“from”:1, “to”:3} or {“r”:1, “i”:-1}, so option B is correct.
23. Spaces, Punctuation marks are called as ________ Symbols in JavaScript.
- Special
- Punctual
- Mandatory
- None of the above
Answer : A Explanation: Spaces, punctuation marks are called as special symbols in JavaScript.
24. Which of the following is not considered a JavaScript operator?
- this
- new
- typeof
- delete
Answer : A Explanation: None.
25. What is the use of < noscript > tag?
- Prevents scripts on the page from executing
- Enclose text to be displayed by non-JavaScript browsers
- Stops cookies
- None of the mentioned
Answer : B Explanation: < noscript > tag enclose text to be displayed by non-JavaScript browsers.
26. Which of the following are the errors in JavaScript?
- Load time errors
- Logical Errors
- Run time errors
- All of the above
Answer : D Explanation: Load time errors: Load-time errors are perhaps the most common and are generally caused by problems in syntax. Run time errors: A runtime error is a program error that occurs while the program is running. Logical Errors: A logic error (or logical error) is a mistake in a program’s source code that results in incorrect or unexpected behavior. So option D is correct.
27. Local Browser used for validations on the Web Pages uses
- HTML
- CSS
- JS
- Java
Answer : C Explanation: Local Browser used for validations on the Web Pages uses JS.
28. Comments in JS are ignored by ______
- Browser
- JVM
- Operating System
- Compiler
Answer : A Explanation: Comments in JS are ignored by the browser.
29. Which of the following is not JavaScript Data Types?
- Float
- Undefined
- Boolean
- Number
Answer : A Explanation: Float is not a JavaScript data type. Different JavaScript Data types are Number, String, Boolean, Object, Undefined. So option A is correct.
30. Javascript is interpreted by
- Server
- Client
- Object
- None of the mentioned
Answer : B Explanation: Javascript is interpreted by the Client. JavaScript is an interpreted language, not a compiled language. A program such as C++ or Java needs to be compiled before it runs. The source code is passed through a program called a compiler, which translates it into bytecode that the machine understands and can execute, So option B is correct.
Pingback: Data Structure MCQ Questions and Answers - cozmocard
Pingback: Computer Networks MCQ Questions And Answers - cozmocard
Pingback: Neural Networks MCQ Questions And Answers - cozmocard