"if (number % 2 === 0)"
why we use "=== 0" in this?
when you put an integer in place of the word number, then the expression becomes a basic math problem. Once it becomes a math problem, it then simply evaluates to either a true or false. (Either it's true that it equals === 0, or it's false and it does not).
Since modulo is basically a remainder math problem, the number would need to be divisible by 2 in order to evaluate as true.
Hope that helps?
'===' is a comparison operator called equal type and equal value. It compares, then, both type and value. The type would be boolean, string, number, etc. The value is the 'content' to say it in a way... The value of "6" is 6, the value of 6 is also 6, but it is a different type. Therefore, we can confirm the following lines are correct.
"7" === 7 //False
7 === 7 //True
7 == "7" //True
7 == 7 //True
'==' is a comparison operater called equal value. It only compares the value, not the type. You can see how it works in the example above.
Hope it helps