JavaScript : sort() method using numeric value