Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. // Test on https://www.webtoolkitonline.com/javascript-tester.html
  2. const list = [ 2, 3, 4, 5, 6, 7, 9, 10, 14, 15, 21]
  3. let k = 8;
  4. const p = list.map((x) => (x % 2 !== 0))
  5. .map((x) => x ? (k + 11) % 3 : ++k);
  6. alert(p)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement