KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
This simple javascript var x = new Array(); x[0] = 2.73; x[1] = 11.17; x[2] = 3.12 x.sort(); for(var i in x) alert(x[i]); produces the results: 11.17, 2.73, 3.12 instead of 2.73, 3.12, 11.17 . Why is that and how can I fix it? Thanks in advance!
Tags (comma-separated)
Save Edits
Cancel