Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ancientVsMemory(input) {
- let nums = input.join(' ').split(' ').map(Number)
- .filter(n=>n!==0)
- .filter(n=>n!==32656)
- .filter(n=>n!==19759)
- .filter(n=>n!==32763);
- while (nums.length>0){
- let cnt = nums.shift();
- console.log(nums.splice(0,cnt).map(n => String.fromCharCode(n)).join(''))
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement