JS Built-ins
← String142 / 195
StringString.prototype.toLocaleLowerCasebeginner

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

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

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

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

Mixed-case ASCII strings are fully lowercased.

Challenge: Implement normalizeLower(str) that lowercases any ASCII string.

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