JavaScript

Practice JavaScript MCQs covering variables, data types, operators, functions, objects, arrays, DOM manipulation, events, ES6+, asynchronous programming, APIs, and modern JavaScript concepts.

3
Topics
304
Total MCQs

JavaScript

Practice JavaScript MCQs covering variables, data types, operators, functions, objects, arrays, DOM manipulation, events, ES6+, asynchronous programming, APIs, and modern JavaScript concepts.

105 MCQs Page 6 of 6
0
0
/ 105
0%
A. Date.now()
B. new Date().getTime()
C. new Date().valueOf()
D. All of the above
Answer: All of these methods return the current time in milliseconds.
A. a1
B. a
C. 1
D. NaN
Answer: String concatenation converts the number to a string, resulting in 'a1'.
A. Array.isArray()
B. isArray()
C. typeof
D. instanceof
Answer: Array.isArray() is the recommended method to check if a value is an array.
A. true
B. false
C. undefined
D. NaN
Answer: 5 > 4 is true, but 4 > 5 is false, so the AND returns false.
A. export
B. exports
C. module.exports
D. All of the above
Answer: export is used in ES modules, while exports and module.exports are used in CommonJS.
4 5 6