src/third_party/mozjs/extract/intl/benchmarks/head.js
/**
 * Go through the top Firefox locales, and pick one at random that is representative
 * of the Firefox population as of 2021-06-03. It uses a pseudo-random number generator
 * to make the results repeatable.
 *
 * @returns {string} locale
 */
Go through the top Firefox locales, and pick one at random that is representative
of the Firefox population as of 2021-06-03. It uses a pseudo-random number generator
to make the results repeatable.

@returns {string} locale
Go through the top Firefox locales and pick one at random that is representative of the Firefox population as of 2021 - 06 - 03 . It uses a pseudo - random number generator to make the results repeatable . @returns { string } locale
function pickRepresentativeLocale() {
  const n = prng();
  let ratio = 1;
  for (const [locale, representation] of Object.entries(localeDistribution)) {
    ratio -= representation;
    if (n > ratio) {
      return locale;
    }
  }
  return "en-US";
}
function pickRepresentativeLocale ( ) { const n = prng ( ) ; let ratio = 1 ; for ( const [ locale , representation ] of Object . entries ( localeDistribution ) ) { ratio -= representation ; if ( n > ratio ) { return locale ; } } return "en-US" ; }
Go through the top Firefox locales, and pick one at random that is representative
 of the Firefox population as of 2021-06-03.
Go through the top Firefox locales and pick one at random that is representative of the Firefox population as of 2021 - 06 - 03 .
// In case we fall through the "for" loop, return the most common locale.