I’m having a bit of trouble.
Currently I am on question 10 where I am trying to test my .inRange() method, but an error pops up and says that it is not defined. (also the text keeps getting cut off and I can’t expand the are to read it more clearly) I’ve looked around but I can’t seem to find a solution.
you know what? I think you’re 100% right. I had a feeling it was something like that. I guess I need to take more time to step back and then return with fresh eyes so I don’t miss these small errors.
Technically, since that is a statement (contains =) it would end with a semi-colon. But, since there are no more statements following, it is not needed. Best practice, though? Always include semi-colons on assignment statements.
That’s a const statement, and that does end in semi-colon
The = doesn’t make it a statement, but it is part of the const statement there
A statement doesn’t have to end in semi-colon, some statements contain semi-colons, others don’t
There’s also a = operator, that isn’t a statement
Also, something that’s far easier than remembering which statements end in semi-colon is to not write out any of them (better than sprinkling them seemingly at random)