1const months = ['March', 'Jan', 'Feb', 'Dec'];
2months.sort();
3console.log(months);
4// expected output: Array ["Dec", "Feb", "Jan", "March"]
1//sorts arrays of numbers
2function myFunction() {
3 points.sort(function(a, b){return a-b});
4 document.getElementById("demo").innerHTML = points;
5}