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

String.prototype.toLocaleLowerCase() β€” basic ASCII lowercase

πŸ“– 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()

str.toLocaleLowerCase() converts a string to lowercase using the host locale's rules. For ASCII strings, the result is deterministic and identical to toLowerCase().

Challenge: Implement localeLower(str) that converts the string to lowercase.

localeLower('HELLO') // β†’ 'hello'
πŸ’‘ Hints (1)
  • β€’ For ASCII strings, `toLocaleLowerCase()` behaves identically to `toLowerCase()`.