Loading

Quipoin Menu

Learn • Practice • Grow

java-script / Date in JavaScript
mcq
Direction: Choose the correct option

Q1.

Which loop is best suited for iterating over arrays?
A. for
B. while
C. do...while
D. forEach
Direction: Choose the correct option

Q2.

What will be the output of the following JavaScript code?

let x = 10;
let y = "10";
console.log(x === y);
A. true
B. false
C. undefined
D. TypeError
Direction: Choose the correct option

Q3.

What is the output of the following JavaScript code?

console.log(typeof undefined);
A. null
B. object
C. undefined
D. number
Direction: Choose the correct option

Q4.

Which of the following best describes a JavaScript closure?
A. A function inside another function
B. A function that remembers its outer scope
C. A loop structure
D. An object method
Direction: Choose the correct option

Q5.

Which keyword is used to declare a block-scoped variable?
A. var
B. let
C. static
D. define