Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

array sorting ascending

employees.sort((a, b) => {
    return a.age - b.age;
});
Code language: JavaScript (javascript)
Source by www.javascripttutorial.net #
 
PREVIOUS NEXT
Tagged: #array #sorting #ascending
ADD COMMENT
Topic
Name
7+3 =