Mini Wordle

A Wordle clone in 214 bytes of JS (not counting the words list) Fork me on Github
<input id=i><p id=p><script>
W=[ /* words list */ ];
w=W[new Date%W.length],g=6,onkeyup=e=>{e.which==13*W.includes
(v=i.value)&&(a=[...w],p.innerHTML+=`
`+[...v].map((e,n)=>e==a[n]?a[n]=0:e).map(e=>e?a[x=a.indexOf(e)
]=~x?"🟨":"⬛":"🟩")+v,i.value=v!=w&&--g?"":w)}
</script>

commented source codetests page

How to play:

- Enter a 5-letter word
- Press Enter
- Green = valid letter
- Yellow = misplaced letter
- Black = wrong letter
- You have 6 guesses
- Guesses must be valid words





Play here:





2022 ~ golfed by xem, p01, subzey, l4m2