Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function sorting(args) {
  2.  
  3.     var a = +args[0]
  4.     var b = +args[1]
  5.     var c = +args[2]
  6.  
  7.     if (a > b) {
  8.         if (b > c) {
  9.             console.log(a);
  10.         } else {
  11.             if (c > a)
  12.                 console.log(c);
  13.             else
  14.                 console.log(a);
  15.         }
  16.     } else { // b > a
  17.         if (c > a) {
  18.             if (c > b) {
  19.                 console.log(c)
  20.             } else {
  21.                 console.log(b);
  22.             }
  23.         } else {
  24.             console.log(b);
  25.         }
  26.     }
  27. }
  28. sorting(['3', '5', '12'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement