Into to JavaScript, Lesson 21: Is it wrong?


The lesson notes say this;
10 % 2 === 0 evaluates to true
7 % 3 === 0 evaluates to false because there is 1 left over.

In actual coding, it's the inverse. the 1 leftover rings out as true, and 0 evaluates to false.


At the same lesson,21,I write the answer like that


But it answers that "Did you remember to take your .substring() from the string 'wonderful day'? Make sure to type your string exactly as shown!"

Sorry,I can't find my mistake!!


It should be



"wonderful day".substring(3,7);


I think you may be disregarding the === 0 part of those expressions.


Excellent point. Thanks for clarifying!