Single Choice
Easy
QWhat is the result of the following code?
var str = "Hello";
console.log(str.toUpperCase());
ID: #4889
Javascript Data Types MCQ
213 views
Question Info
#4889Q 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
The toUpperCase() method in JavaScript is a string method that converts all the characters in a string to uppercase.
In this case, the toUpperCase() method is called on the string "Hello", which converts all the characters in the string to uppercase.
The result is the string "HELLO", which is logged to the console.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic