JavaScript MCQ Questions and Answers for Freshers
Categories: MCQS
JavaScript MCQ Questions and Answers for Freshers
1. Which of the keyword is used to define the variable in the JavaScript?
- var
- let
- Both A & B
- None of the above
Answer - c. Both A & B
2. which of the method is used to get HTML element in JavaScript?
- getElementbyId()
- getElementsByClassName()
- Both A & B
- None of the above
Answer - c. Both A & B
3. What does NaN means?
- Negative Number
- Not a Number
- Both A & B
- None of the Above
Answer -b. Not a Number
4. How do we put JavaScript inside HTML?
- <js>
- <javascript>
- <scripting>
- <script>
Answer -d. <script>
5. Which of the following is not a JavaScript framework?
- Vue
- React
- Node
- Laravel
Answer - d. Laravel
6. Which of the following tag used to write JavaScript code?
- <script>
- <js>
- <javascript>
- <java>
Answer -a. <script>
7. The "let" and " var" are known as:
- Prototype
- Declaration statements
- Data Types
- Keywords
Answer -b. Declaration statements
8. Which one is not a comparison operator?
- =
- <
- >
- !=
Answer -a. =
9. Which type of JavaScript language is?
- Object-oriented
- Object-based
- Functional
- None of above
Answer -b. Object-based
10. Which symbol is used separate JavaScript statements?
- Comma(,)
- Colon(:)
- Hyphen(_)
- Semicolon(;)
Answer -d. Semicolon(;)