Uppercase String in JavaScript

Level 135 keystrokes

Converts the string "hello" to uppercase and prints "HELLO".

JavaScript code

// toUpperCase() returns a new string with every letter in uppercase: "HELLO"
// Strings are immutable, so the original "hello" is not changed
1console.log("hello".toUpperCase());

Output

HELLO
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this JavaScript code and how often they appear.

  • .× 2
  • "× 2
  • (× 2
  • )× 2
  • ;× 1

More JavaScript examples at level 1

← JavaScript typing practice