![]() Output:- Before Sorting: George,Veronica,Mounika,ShaunikĪfter Sorting: George,Mounika,Shaunik,Veronica Sort the array of names Using Default Sorting Ascending:-Ĭode:- let arrayOfNames = Ĭonsole.log("Before Sorting: " + arrayOfNames ) Ĭonsole.log("After Sorting: " + arrayOfNames.sort()) Javascript’s sort() method is used to sort all the array elements and return the sorted array.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |