MCQ
Single Best Answer
Not Set
QWhat is the result of the following code?
console.log(5 * '5');
ID: #4862
Basic JavaScript MCQ
237 views
Question Info
#4862Q ID
Not SetDifficulty
Basic JavaScript MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option A
Explanation
The result of the code is 25.
In JavaScript, the * operator performs multiplication if both operands are numbers.
In this case, the string '5' is coerced to the number 5, so the final result is 5 * 5 = 25
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic