Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(args) {
- const step = Number(args.pop());
- const arrResult = args.filter((_, index) => index % step === 0);
- console.log(arrResult.join('\n'));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement