Welcome to the Treehouse Community
Looking to learn something new?
Jian Chen4,938 Points
Why set something to false as default in a boolean method and return it when it was not used for anything else?
In 9:53 of the "Validation" video, Craig return isHit; and it was set to false as default within that boolean method. But the method does utilize the isHit variable in any way other then returning it in the end. Then what is the whole point? Am i missing something? Please help me clarify this, I would really appreciate any help.
At about 8:38 in the video, Craig sets
isHit equal to the return value of
Hope this helps,