Standard built-ins

Intl.PluralRules.prototype.select()

Try the free JavaScript compiler

Choose grammatical plural category of numeric input based on locale, cardinal/ordinal type and rounding.

Formal Syntax & Structure

javascript syntaxjavascript
formatter.select(number)

Parameters & Attributes

NameTypeDescription
numberNumberQuantity or rank.

Return Value

String

Plural category.

Working Example

Example Snippetjavascript
console.log(new Intl.PluralRules("en").select(1));
JavaScript Reference