toLocaleUpperCase() method converts a string to upper case letters, using current locale.
syntax ↴
toLocaleUpperCase(locales) ↴
locales (optional). A string with a BCP 47 language tag, or an array of such strings.
Indicates the locale to be used to convert to upper case according to any locale-specific case mappings.
The locale is based on the language settings of the browser.
toLocaleUpperCase() method does not change the original string.
toLocaleUpperCase() returns the
same result as toUpperCase(),
except for locales that conflict with the regular Unicode
case mappings (such as Turkish).
i\u0307 represents a small letter ı without a dot above it, combined with \u0307 which adds a dot above it: i
'i\u0307'.toLocaleUpperCase('tr-TR') === 'İ̇'; returns true.
'i\u0307'.toLocaleUpperCase('en-GB') === 'İ̇'; returns false.
If incorrect locale information is provided RangeError will be thrown.
myString.toLocaleUpperCase()
myString.toLocaleUpperCase(locales)