JavaScript with Statement Explained – A Deep Dive

By @wagslane (twitter) Let’s look at the JavaScript with statement. We will go over the simple uses, as well as a deep dive into some more advanced concepts. Note: Use of the with statement is discouraged. It can lead to strange bugs. That said, it is imp… Read more

Similar

The Case for Weak Dependencies in JavaScript

Earlier today, I was briefly entertaining the idea of writing a library to wrap and enhance querySelectorAll in certain ways. I thought I’d rather not introduce a Parsel dependency out of the box, but only use it to parse selectors properly when it’s avai... (more…)

Read more »

Rethinking the JavaScript Ternary Operator

Lots of people treat the ternary operator with suspicion. At first glance, ternaries appear unnecessary. Nothing more than a tool for the overly clever to trim some characters from their code. A favourite hack for coders who don’t care about readability. ... (more…)

Read more »