diff --git a/day06.js b/day06.js new file mode 100644 index 0000000..498b3c8 --- /dev/null +++ b/day06.js @@ -0,0 +1 @@ +let d=(document.body.textContent+`\n`).split`\n\n`,y=g=>[...new Set(g.replace(/\n/g,'').split``)];[d.reduce((a,g)=>a+y(g).length,0),d.reduce((a,g)=>a+y(g).filter(b=>g.split(b).length==g.split`\n`.length+1).length,0)] \ No newline at end of file