Advertisement
ad2bg

ancientVsMemory

Jun 5th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function ancientVsMemory(input) {
  2.     let nums = input.join(' ').split(' ').map(Number)
  3.         .filter(n=>n!==0)
  4.         .filter(n=>n!==32656)
  5.         .filter(n=>n!==19759)
  6.         .filter(n=>n!==32763);
  7.  
  8.     while (nums.length>0){
  9.         let cnt = nums.shift();
  10.         console.log(nums.splice(0,cnt).map(n => String.fromCharCode(n)).join(''))
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement