News for hackers. Stuff that matters.
Re:How to Build Minesweeper with JavaScript by yrwwywtywsrty on Thursday July 25, 2019 @09:58AM (#20525390)
Although I usually agree with the 'jQuery is overused' side of the crowd, I think your example is one of the times when I see that jQuery wins in ease and readability.

The jQuery equivalent for this is $('.foo').addClass('bar');

Re:How to Build Minesweeper with JavaScript by chrismorgan on Thursday July 25, 2019 @10:02AM (#20525408)
I really dislike the way jQuery makes no distinction between mutations on one or many elements. I view the native APIs’ differentiation of the two, requring you to be explicit (`document.querySelector('.foo').classList.add('bar')` versus `document.querySelectorAll('.foo').forEach(foo => foo.classList.add('bar'))`) to be a feature.
Re:How to Build Minesweeper with JavaScript by onion2k on Thursday July 25, 2019 @11:28AM (#20526211)
My version doesn't need a 30Kb library though.