relevants@feddit.de to Programmer HumorEnglish · 1 year agoJavaScript Pro Tip!feddit.deimagemessage-square18fedilinkarrow-up1109arrow-down10
arrow-up1109arrow-down1imageJavaScript Pro Tip!feddit.derelevants@feddit.de to Programmer HumorEnglish · 1 year agomessage-square18fedilink
minus-squarenodiet@feddit.delinkfedilinkEnglisharrow-up5·1 year agoAs someone who only had very peripheral contact with JavaScript I can’t tell if this is real and that is really the beauty (/s) of this language
minus-squareamki@feddit.delinkfedilinkEnglisharrow-up4·1 year agoIt also works for booleans: If you want variable x to become boolean just negate it twice: !!b
As someone who only had very peripheral contact with JavaScript I can’t tell if this is real and that is really the beauty (/s) of this language
It also works for booleans: If you want variable x to become boolean just negate it twice: !!b