Single Choice
Easy
QWhich of the following is not a valid way to create a new string in JavaScript?
ID: #4880
Javascript Data Types MCQ
167 views
Question Info
#4880Q 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, D, and E are all valid ways to create a new string in JavaScript,
using the "new" keyword and the String constructor function (as in C) is not recommended,
because it can cause confusion with the primitive string 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