Created
June 29, 2017 22:32
-
-
Save GuillaumeNachury/bbd03587e76bb40405421caddf2b8ab4 to your computer and use it in GitHub Desktop.
Order list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let aFamily = [{name:"Veronique", age:34},{name:"Arthur", age:4},{name:"Guillaume", age:35}]; | |
function getSortedFamily(){ | |
return aFamily.sort((a,b)=>a.age - b.age); | |
} | |
getSortedFamily(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment