Mitchell warr
Member since Jul 12, 2020
- Profile: /members/14196-mitchell-warr.htm
- Comments: 3
Recent Blog Comments By Mitchell warr
-
The Double-Bang (!!) Operator And A Misunderstanding Of How JavaScript Handles Truthy / Falsy Values
Posted on Jul 13, 2020 at 3:02 PM
@Howard, Id argue Boolean() is MORE confusing for quick readers as the difference between new Boolean() and Boolean() is tiny, but functionally they are completely different If (Boolean(false)) returns false If (new Boolean(false)) returns true... read more »
-
The Double-Bang (!!) Operator And A Misunderstanding Of How JavaScript Handles Truthy / Falsy Values
Posted on Jul 13, 2020 at 2:57 PM
@Ben, The reason its in jsx code so much is that you tend to get a little paranoid about things being returned in the jsx when you only want a boolean. For instance if you used an array as a truthy value, and somehow it was returned because you didnt do the condition correctly, or due to s... read more »
-
The Double-Bang (!!) Operator And A Misunderstanding Of How JavaScript Handles Truthy / Falsy Values
Posted on Jul 12, 2020 at 3:41 PM
The comment on jsx is correct except for when dealing with zeros. In this instance, this falsy value will be rendered into html as the character 0... read more »