You are viewing a single comment's thread. Return to all comments →
n % 2 is the condition.
n % 2
If the condition is true ( 1 also is true), then use n * 3,
n * 3
if not, then use n * 2.
n * 2
Example:
n = 11; 11 % 2 = 1 (there is a leftover), therefore 11 * 3
Seems like cookies are disabled on this browser, please enable them to open this website
Day 5: Arrow Functions
You are viewing a single comment's thread. Return to all comments →
n % 2is the condition.If the condition is true ( 1 also is true), then use
n * 3,if not, then use
n * 2.Example: