Can anyone verify this for me? JavaScript does not have a version of strcmp(), so you have to write out something like:
( str1 < str2 ) ?
-1 :
( str1 > str2 ? 1 : 0 );
As this question is really just me complaining, I wouldn't normally waste your time with it, but I wasted 30 minutes looking for such a function (who wants people pointing at your code and laughing "This doof re-implemented strcmp!"), so I thought it might be nice for there to be a page on the Web (like stackoverflow) explicitly states so.