Skip to main content
added 166 characters in body
Source Link
Inkbug
  • 554
  • 4
  • 15

Javascript, 7575 60

With the new arrow notation:

o=(s)=>s+((0|s/10%10)==1?"th":[,"st","nd","rd"][s%10]||"th")

Old version, without arrow notation (75 chars):

function o(s){return s+((0|s/10%10)==1?"th":[,"st","nd","rd"][s%10]||"th")}

Javascript, 75

function o(s){return s+((0|s/10%10)==1?"th":[,"st","nd","rd"][s%10]||"th")}

Javascript, 75 60

With the new arrow notation:

o=(s)=>s+((0|s/10%10)==1?"th":[,"st","nd","rd"][s%10]||"th")

Old version, without arrow notation (75 chars):

function o(s){return s+((0|s/10%10)==1?"th":[,"st","nd","rd"][s%10]||"th")}
Commonmark migration
Source Link

#Javascript, 75 function o(s){return s+((0|s/10%10)==1?"th":[,"st","nd","rd"][s%10]||"th")}

Javascript, 75

function o(s){return s+((0|s/10%10)==1?"th":[,"st","nd","rd"][s%10]||"th")}

#Javascript, 75 function o(s){return s+((0|s/10%10)==1?"th":[,"st","nd","rd"][s%10]||"th")}

Javascript, 75

function o(s){return s+((0|s/10%10)==1?"th":[,"st","nd","rd"][s%10]||"th")}
Source Link
Inkbug
  • 554
  • 4
  • 15

#Javascript, 75 function o(s){return s+((0|s/10%10)==1?"th":[,"st","nd","rd"][s%10]||"th")}