Looks like you didn't read the article.
> Your frontend can't crash if you don't use JavaScript. HTML doesn't throw exceptions. Less code is always better.
Less code is not always better.
I'm aware that the example I chose here is similar to the checkbox trick the article outlines but I'm using it as an example of how JS can improve UI, not as a direct rebuttal to the article.
The checkbox trick itself sounds like an accessibility nightmare, so again, you're not necessarily serving the user's best interest by doing code parkour to avoid two lines of JavaScript.