JavaScript MCQs

30 MCQs  — Web Development MCQs  (Page 1 of 3)

Practice JavaScript MCQs with correct answers and explanations. These questions are from the Web Development MCQs section.

With const obj = {a: 1};, what happens with obj.a = 2;?
TypeError
It works; const prevents reassigning the variable, not mutating the object
SyntaxError
obj becomes undefined