Subj : syncWXremix and Dial-up
To : KenDB3
From : echicken
Date : Thu Jan 07 2016 01:31 pm
Re: syncWXremix and Dial-up
By: KenDB3 to Digital Man on Thu Jan 07 2016 11:33:47
>>>> var dialup = (parseInt(user.connection) > 0);
Ke> if (dialup === 'true')
Ke> ...should be...
Ke> if (dialup === true)
Ke> Triple Equals works... At some point I tried Double Equals instead (stil
Ke> works). Should I stick with Triple? I read up on the difference, but not
Ke> sure if one might be better than the other in this particular case.
The difference between == and === can be pretty big in some situations. See
here for a lot of info:
http://tinyurl.com/paz96fe
But ultimately you can just do this:
if (dialup) {
// If dialup is true, then this happens
} else {
// Otherwise this happens
}
I'd still recommend reading up on == vs. ===, because using both without
knowing the difference would probably lead to much confusion.
---
echicken
electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
� Synchronet � electronic chicken bbs - bbs.electronicchicken.com