Oh, just wondering - what might be fastest:
(( Math.floor((n%100)/10) == 1)
With one scope jump, one property lookup, one function call, one remainder, one division and one comparison, or
( this % 100 - nModTen != 10 ) * nModeTen
With one remainder, one subtraction, one comparison, one autocasting, and one multiplication.
I believe your code would win out, in those cases. (The access part (scope jump and property lookup) should be fast compared to my math, and the function call and the autocast should both be almost unnoticable) However, my single comparison should make my code faster in the cases of 'th', when I won't have to perform all those numerical operations. So, how would they compare for many numbers, performance wise?