Skip to content

Instantly share code, notes, and snippets.

@iammerrick
Created April 5, 2010 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iammerrick/356693 to your computer and use it in GitHub Desktop.
Save iammerrick/356693 to your computer and use it in GitHub Desktop.
Number.implement({
toFriendly: function(){
switch(this.toInt() + 1)
{
case 1:
return "first";
break;
case 2:
return "second";
break;
case 3:
return "third";
break;
case 4:
return "fourth";
break;
case 5:
return "fifth";
break;
case 6:
return "sixth";
break;
case 7:
return "seventh";
break;
case 8:
return "eigth";
break;
case 9:
return "ninth";
break;
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment