2 ms·
Wow, I had completely forgotten the existence of void in JavaScript. Why is it needed here? To force an expression without using the parentheses? Edit: Yes, i
by jraph 7y ago
Wow, I had completely forgotten the existence of void in JavaScript.
Why is it needed here? To force an expression without using the parentheses?
Edit: Yes, it seems so, and this usage with functions is explicitly documented there: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- ericlewis 7y agoYep. Exactly why. Seems silly since it doesn’t really care for types in the first place.
- deleted 7y ago[deleted]