Modern Programming Languages MCQs with Answers
Practice important Modern Programming Languages MCQs with answers and explanations.
Multiple Choice Questions
Q751: Where should JavaScript code be placed for execution when the page loads?
- A: In the element
- B: In the element
- C: Inside an external CSS file
- D: In a
View Answer
B
Q752: JavaScript statements are terminated by:
- A: Commas
- B: Semicolons
- C: Colons
- D: Periods
View Answer
B
Q753: JavaScript is considered a:
- A: Strongly typed language
- B: Weekly typed language
- C: Compiled language
- D: Assembly language
View Answer
B
Q754: What type of operator is + in JavaScript?
- A: Arithmetic
- B: Comparison
- C: Logical
- D: String
View Answer
D
Q755: Arrays in JavaScript are:
- A: 1-based
- B: 0-based
- C: Dynamically typed
- D: Immutable
View Answer
B
Q756: What is the result of the expression var x = "10" - 2; in JavaScript?
- A: Error
- B: 8
- C: "102"
- D: 2
View Answer
B
Q757: Which of the following is a logical operator in JavaScript?
- A: &
- B: &&
- C: !=
- D: ===
View Answer
B
Q758: Arrays in JavaScript can hold:
- A: Only numbers
- B: Only strings
- C: Any data type
- D: Only booleans
View Answer
C
Q759: What does the typeof operator in JavaScript return?
- A: The data type of a variable
- B: The memory address of a variable
- C: The size of a variable
- D: The name of the variable
View Answer
A
Q760: What is the purpose of the break statement in JavaScript?
- A: To skip the current iteration
- B: To exit a loop or switch block
- C: To continue to the next iteration
- D: To define a function
View Answer
B