atmin
Member since Jul 4, 2020
- Profile: /members/14194-atmin.htm
- Comments: 2
Recent Blog Comments By atmin
-
The Double-Bang (!!) Operator And A Misunderstanding Of How JavaScript Handles Truthy / Falsy Values
Posted on Jul 4, 2020 at 1:42 PM
I think of it not as a "constructor", but as a "type", lack of new helps with that perception. Less punctuation (albeit more characters overall) feels more elegant to me ¯_(ツ)_/¯... read more »
-
The Double-Bang (!!) Operator And A Misunderstanding Of How JavaScript Handles Truthy / Falsy Values
Posted on Jul 4, 2020 at 4:48 AM
If you want to cast something to boolean, I find Boolean(something) most obvious. And if you want to filter out falsy values from an array, [...].filter(Boolean)... read more »