nikolayneykov

Untitled

Feb 9th, 2019
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve(arr) {
  2.     console.log(arr.filter((e, i) => e >= Math.max(...arr.slice(0, i + 1))).join(' '));
  3. }
Advertisement
Add Comment
Please, Sign In to add comment