Jump to content
Larry Ullman's Book Forums

Chapter.7 7.2.2


Recommended Posts

Hi:
 
  i come from china. If my English is not good,  hope you can understand. i am using Google  translation 
  I was confused about the example on chapter 7.2.2. About function sort(). The book says:

var numbers = [1, 4, 3, 2];
numbers.sort(); //4, 1, 3, 2

why it ordered  4, 1, 3, 2? I test this code and it always to be 1, 2 ,3 ,4  .even IE 6.

 

thank you.

Link to comment
Share on other sites

 Share

×
×
  • Create New...