From e8320a12404645bb878f12c6852a955783071285 Mon Sep 17 00:00:00 2001 From: Joshua Seigler Date: Sun, 6 Dec 2020 01:13:26 -0500 Subject: [PATCH] Day 6 --- day06.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 day06.js 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