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