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 available

Start Course Browse MCQs
A A scripting language
B A markup language
C A database
D An operating system
A var
B let
C const
D All of the above
A null
B undefined
C object
D number
A JSON.stringify()
B JSON.parse()
C JSON.convert()
D JSON.toObject()
A ==
B ===
C =
D !==
A push()
B pop()
C shift()
D unshift()
A true
B false
C undefined
D NaN
A String
B Number
C Float
D Boolean
A Refers to the current object
B Refers to the global object
C Refers to the parent object
D All of the above depending on context
A push()
B pop()
C shift()
D slice()
A <!-- comment -->
B // comment
C /* comment */
D Both b and c
A class
B function
C object
D new
A array
B object
C undefined
D null
A length()
B len()
C size()
D length
A 4
B 22
C NaN
D TypeError
A JSON.parse()
B JSON.stringify()
C JSON.convert()
D JSON.toJSON()
A false
B true
C undefined
D NaN
A Object.create()
B new Object()
C {}
D All of the above
A Creates a new function with a specific this value
B Binds an event to an element
C Binds two objects together
D None of the above
A 10
B 11
C 1
D NaN