SHARE
TWEET

Untitled

a guest Jun 13th, 2019 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for(var i=0; i<=attempts.length-2; i++){
  2.   var minValue = attempts[i];
  3.  
  4.   for(var j=i+1; j<=attempts.length-1; j++){
  5.     if(attempts[j]>minValue){
  6.       minValue = attempts[j];
  7.       var memory = attempts[i];
  8.       attempts[i] = minValue;
  9.       attempts[j] = memory;
  10.       console.log(attempts);
  11.     }
  12.   }
  13. }
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