Re: syncWXremix and Dial-up
By: Digital Man to Nightfox on Sat Jan 09 2016 19:59:22
>> Isn't the "=== true" redundant? Saying "if (dialup)" should be
>> enough, and it's just as clear as saying "if (dialup === true)", since
>> that has the same meaning.
DM> Usually, and in the case of this particular script, if(dialup) and
DM> if(dialup == true) and if(dialup === true) are all functionally
DM> equivalent.
DM> However, technically if(dialup) is the equivalent of: if(dialup != false),
DM> because if dialup = 2, let's say, then if(dialup == true) or if(dialup ===
DM> true) would not execute the if-block while if(dialup) would still execute
DM> the if-block. if(Boolean(dialup) == true) is the equivalent of if(dialup).
DM> :-)
:) Makes sense. I'm still getting to know all the cases of how variables
behave in JavaScript. Logically, though, it seemed redundant to check for
equivalence to true in an if check. :)
Nightfox
---
■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
|