Answers for "write a javascript for sorting the elements of array using functions"

3

sorting of arraray's number element in javascript

let numbers = [0, 1, 2, 3, 10, 20, 30];
numbers.sort((a, b) => a - b);

console.log(numbers);
Posted by: Guest on April-17-2020

Code answers related to "write a javascript for sorting the elements of array using functions"

Browse Popular Code Answers by Language