We're a place where coders share, stay up-to-date and grow their careers.
For #1 Complex condition expressions I would prefer writing the complex condition, as it is simpler than 3 if statements.
function isColdOutside(temp, gusts, snowing){ return ((temp === 0) || (temp > 0 && temp < 5 && gusts > 10) || (snowing)) }
For #1 Complex condition expressions
I would prefer writing the complex condition, as it is simpler than 3 if statements.