JS Built-ins
← String147 / 195
StringString.prototype.toLocaleUpperCasebeginner

String.prototype.toLocaleUpperCase() β€” mixed case

πŸ“– Usage Example
'hello'.toLocaleUpperCase()   // β†’ 'HELLO'
'world'.toLocaleUpperCase()   // β†’ 'WORLD'
'abc123'.toLocaleUpperCase()  // β†’ 'ABC123'

Use toLocaleUpperCase() to convert a string to uppercase using the locale-specific rules of the host environment.

String.prototype.toLocaleUpperCase() β€” Mixed Case

Mixed-case ASCII strings are fully uppercased.

Challenge: Implement normalizeUpper(str) that uppercases any ASCII string.

normalizeUpper('HeLLo WoRLd') // β†’ 'HELLO WORLD'
πŸ’‘ Hints (1)
  • β€’ Every lowercase ASCII letter is converted to its uppercase equivalent.