Convert String to Uppercase
Fill in the Blank Easy
Question
Fill in the blank to convert the text to uppercase.
Code
const text = "hello";
const upper = text.___();
console.log(upper); // HELLO
Hint
The method name describes what it does: 'to upper case'.
Explanation
The toUpperCase() method converts all characters in a string to uppercase. "hello".toUpperCase() returns "HELLO". The method name is camelCase: toUpperCase (not touppercase or ToUpperCase).
Related Resources
Related Lessons
- Strings and Text
Learn how strings and text work in programming.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.