SHARE
TWEET

Untitled

a guest Apr 19th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ordinal_suffix_of = function(i) {
  2.   var j, k;
  3.   j = i % 10;
  4.   k = i % 100;
  5.   if (j === 1 && k !== 11) {
  6.     return i + 'st';
  7.   }
  8.   if (j === 2 && k !== 12) {
  9.     return i + 'nd';
  10.   }
  11.   if (j === 3 && k !== 13) {
  12.     return i + 'rd';
  13.   }
  14.   return i + 'th';
  15. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top