Guest User

Untitled

a guest
Nov 16th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. const arr = ['1', '2', '3', '4'];
  2.  
  3. const res = arr
  4. .map((el) => parseInt(el))
  5. .filter((num) => num%2)
  6. .reduce((max, value) => Math.max(max, value), 0);
Add Comment
Please, Sign In to add comment