Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript filter and order

let numbers = [4, 2, 5, 1, 3];
numbers.sort((a, b) => a - b);
console.log(numbers);

// [1, 2, 3, 4, 5]
 
PREVIOUS NEXT
Tagged: #javascript #filter #order
ADD COMMENT
Topic
Name
5+4 =