I have following array
temp = [1230, 900, 1000, 2130, 2400]
and used temp.sort()
to sort it by value and when see it using console.log its gives following
[1000, 1230, 2130, 2400, 900]
this supposed to be done like
[900, 1000, 1230, 2130, 2400]
is there anything wrong or need to use some other method ?