Skip to content

Instantly share code, notes, and snippets.

@GuillaumeNachury
Created June 29, 2017 22:32
Show Gist options
  • Save GuillaumeNachury/bbd03587e76bb40405421caddf2b8ab4 to your computer and use it in GitHub Desktop.
Save GuillaumeNachury/bbd03587e76bb40405421caddf2b8ab4 to your computer and use it in GitHub Desktop.
Order list
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