Jump to content
Larry Ullman's Book Forums

Recommended Posts

  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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...