Ad
Code
Diff
  • removeEveryThird=s=>s[0]+[...s].filter((_,i)=>i%3!==0).join``
    • function removeEveryThird(str) {
    • return str.split('').filter((_, i) => i === 0 || i % 3 !== 0).join('');
    • }
    • removeEveryThird=s=>s[0]+[...s].filter((_,i)=>i%3!==0).join``