Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(args) {
- const step = Number(args.pop());
- const newItems = [];
- const getELement = (arg1) => {
- for (let i = 0; i < arg1.length; i += step) {
- newItems.push(args[i]);
- }
- };
- getELement(args);
- console.log(newItems.join('\n'));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement