Parameters: This method accept two parameters as mentioned above and described below:
- locales: This parameter is a string with a BCP 47 language tag, or an array of such strings.
- options: It is an optional parameter. It is an object that have localeMatcher property. The localeMatcher is the locale matching algorithm to use. It has the values are “lookup” and “best fit”.
Return value: This method returns an array of strings representing a subset of the given locale tags.
Array ["id-u-co-pinyin", "de-ID"]
Supported Browsers: The browsers supoorted by Intl.Collator.supportedLocalesOf() method are listed below:
- Google Chrome