Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sort by ascending javascript

const months = ['March', 'Jan', 'Feb', 'Dec'];
months.sort();
console.log(months);
// expected output: Array ["Dec", "Feb", "Jan", "March"]
 
PREVIOUS NEXT
Tagged: #sort #ascending #javascript
ADD COMMENT
Topic
Name
9+2 =