Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Biblio

a guest Mar 28th, 2020 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function management(books){
  2.   for (let i = 0; i < books.length; i++){
  3.     for(var j = 0 ; j < books.length - i - 1; j++){
  4.       if(books[j].id > books[j+1].id){
  5.         var temp = books[j];
  6.           books[j] = books[j+1];
  7.           books[j + 1] = temp;
  8.       }
  9.     }
  10.   }
  11.   return books;
  12. }
  13.  
  14. console.log (management([{titulo:'herp',autor:'derp',id:123},
  15. {titulo:'herp',autor:'derp',id:321},
  16. {titulo:'herp',autor:'derp',id:111},
  17. {titulo:'herp',autor:'derp',id:1}]))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top