The SORT function in javascripts can not return the correct answer in some situations.
I use http://jsconsole.com to test some examples:
[2, 10].sort()[2, 10]
[3, 10].sort()[10, 3]
[9, 10].sort()[10, 9]
[10, 11].sort()[10, 11]
I tested it on windows xp, windows 2008 with firefox and chrome.