You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In your code you have:
temperature = temperature | 50;
Which is bitwise operation (for example temp 100 comes out as 118). You probably intended to do temperature || 50 but this doesn't work either because 0 evaluates to false and it is set to 50 again.
I would go for something like: temperature = isNaN(temperature)?50:temperature
The text was updated successfully, but these errors were encountered:
In your code you have:
temperature = temperature | 50;
Which is bitwise operation (for example temp 100 comes out as 118). You probably intended to do temperature || 50 but this doesn't work either because 0 evaluates to false and it is set to 50 again.
I would go for something like: temperature = isNaN(temperature)?50:temperature
The text was updated successfully, but these errors were encountered: