Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Sorting in JavaScript

var l = ["a", "w", "r", "e", "d", "c", "e", "f", "g"];
console.log(l.sort())
/*[ 'a', 'c', 'd', 'e', 'e', 'f', 'g', 'r', 'w' ]*/
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #Sorting #JavaScript
ADD COMMENT
Topic
Name
8+5 =