Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(arr) {
- let print = "";
- for(let i = 0; i < arr.length - 1; i += Number(arr[arr.length - 1])) {
- print += `${arr[i]} `;
- }
- console.log(print.trim());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement