Advertisement
3vo

Problem 4. Number Comparer

3vo
Oct 25th, 2022 (edited)
596
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let input = [
  2.     '-5',  // the input is always a string, so it's '3' and not 3
  3.     '-2'
  4. ];
  5. let print = this.print || console.log;
  6. let gets = this.gets || ((arr, index) => () => arr[index++])(input, 0);
  7.  
  8. let num = +gets();
  9. let num1 = +gets();
  10.  
  11. print(Math.max(num, num1));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement