Single Choice
Easy
QWhich of the following is not a valid way to create a new number in JavaScript?
ID: #4882
Javascript Data Types MCQ
180 views
Question Info
#4882Q ID
EasyDifficulty
Javascript Data Types MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
While A, B, D, and E are all valid ways to create a new number in JavaScript, using the "new" keyword and the Number constructor function (as in C) is not recommended,
because it can cause confusion with the primitive number data type.
It is better to use either of the other options.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic