how to sort array least to greatest javascript

JavaScript
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.sort();
 
Source

Also in JavaScript: