JSFiddle - React, Tailwind, and code Playground

https://qiita.com/lhankor_mhy/items/7c31211507cd0e61a9f3

by Lhankor_Mhy

JavaScript

{
  const pr = new Intl.PluralRules('en-US', { type: 'ordinal' });
  const or = { other:'th', one:'st', two:'nd', few:'rd' }
  const o = n => n + or[ pr.select(n) ];
  
  document.body.innerHTML = Array.from( new Array(25), ( ...[,i] ) => i ).map(o);
}