I have an array of float point numbers:
[ 82.11742562118049, 28.86823689842918, 49.61295450928224, 5.861613903793295 ]
After running sort() on the array I get this:
[ 28.86823689842918, 49.61295450928224, 5.861613903793295, 82.11742562118049 ]
Notice how 5.8... is bigger than 49.6... for JavaScript (Node). Why is that?
How can I correctly sort this numbers?