Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sorting(args) {
- var a = +args[0]
- var b = +args[1]
- var c = +args[2]
- if (a > b) {
- if (b > c) {
- console.log(a);
- } else {
- if (c > a)
- console.log(c);
- else
- console.log(a);
- }
- } else { // b > a
- if (c > a) {
- if (c > b) {
- console.log(c)
- } else {
- console.log(b);
- }
- } else {
- console.log(b);
- }
- }
- }
- sorting(['3', '5', '12'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement