SHARE
TWEET

Untitled

a guest May 28th, 2019 107 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const getGets = (arr) => {
  2.     let index = 0;
  3.  
  4.     return () => {
  5.         const toReturn = arr[index];
  6.         index += 1;
  7.         return toReturn;
  8.     };
  9. };
  10. // this is the test
  11. const test = [
  12.   '-0.54',
  13.   '-10',
  14.   '-0.6',
  15. ];
  16.  
  17. const gets = this.gets || getGets(test);
  18. const print = this.print || console.log;
  19.  
  20. let number1 = +gets();
  21. let number2 = +gets();
  22. let number3 = +gets();
  23.  
  24. if (number1>=number2 && number1>= number3){
  25.     console.log (number1);
  26. }
  27.  
  28. else if (number2 >= number1 && number2>= number3 ) {
  29.     console.log(number2);
  30. }
  31.  
  32. else {
  33.     console.log(number3);
  34. }
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