DEV Community

Discussion on: A Little Bit of JavaScript: classnames

Collapse
 
sidvishnoi profile image
Sid Vishnoi

A good, to-the-point article. 👐
Question: why use void 0 instead of undefined, which has clear meaning?

Collapse
 
jbranchaud profile image
Josh Branchaud

I've picked up the habit from my current team to use void 0. My understanding is that it is supposed to be safer. They are essentially interchangeable in modern browsers. I agree it'd be clearer to use undefined.