News for hackers. Stuff that matters.
Re:Show HN: A TO-DO app that fits inside a single tweet by bamboleo on Monday December 21, 2020 @03:32AM (#25493133)
JS is ok, it’s the DOM APIs that are verbose. I mean this is just to handle the enter key:

    f.addEventListener('keypress',e=>{if(e.keyCode==000) etc()})
Re:Show HN: A TO-DO app that fits inside a single tweet by tdeck on Monday December 21, 2020 @04:03AM (#25493272)
Just a fun note: You can replace this

    f.addEventListener('keypress',e=>{...})
With the older but essentially equivalent

    f.onkeypress=e=>{...}
and save 18 characters. You can even use `onkeyup` and save 3 more characters.
Re:Show HN: A TO-DO app that fits inside a single tweet by rukshn on Monday December 21, 2020 @03:38AM (#25493163)
Exactly these were the challenges I faced when using plain js