LookupSupportedLocales = function (isAvailableLocale, requestedLocales) {
        const subset = [];
        let i = 0;
        _.forEach(requestedLocales, function (locale) {
            const noExtensionsLocale = parseLangtag(locale).base;
            if (BestAvailableLocale(isAvailableLocale, noExtensionsLocale) !== undefined) {
                _.defineProperty(subset, i++, {value: locale, enumerable: true, configurable: true, writable: true});
            }
        });

        return subset;
    }
Returns the subset of requestedLocales that has a matching locale according to BestAvailableLocale.

ECMA402: #sec-lookupsupportedlocales

@param {Function} isAvailableLocale A function that takes a locale and returns if the locale is supported
@param {String|String[]} requestedLocales