You are viewing a single comment's thread. Return to all comments →
The explanation of the rules actually nests the if statements the way you should in your code for this type of problem.
Notice how they indent further each of the three bullet-pointed rules?
You don't want these to be separate checks, but rather a cascading condition.
Seems like cookies are disabled on this browser, please enable them to open this website
Write a function
You are viewing a single comment's thread. Return to all comments →
The explanation of the rules actually nests the if statements the way you should in your code for this type of problem.
Notice how they indent further each of the three bullet-pointed rules?
You don't want these to be separate checks, but rather a cascading condition.