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