Chapter.7 7.2.2 in Modern Javascript: Develop and Design Posted May 9, 2015 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.
Chapter.7 7.2.2
in Modern Javascript: Develop and Design
Posted
Hi:
i come from china. If my English is not good, hope you can understand.
i am using Google translationI was confused about the example on chapter 7.2.2. About function sort(). The book says:
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.