Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sort array method

//The sort() method sorts an array alphabetically:
const fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.sort();
//output >> [ "Apple",Banana","Mango", "Orange" ]

//if you find the answer is useful ,
//upvote ⇑⇑ , so can the others benefit also . @mohammad alshraideh ( ͡~ ͜ʖ ͡°)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sort #array #method
ADD COMMENT
Topic
Name
5+4 =