JavaScript · Senior · Question 72 of 75

Why use Intl.PluralRules for messages like "5 files"?

Explanation

new Intl.PluralRules("uk").select(5) returns "many", while English only distinguishes one/other. i18n libraries build on it.

Further reading

Problem with a question

JavaScript · Senior · question 72

Test yourself

Take the JavaScript · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz