The logic -
once a function returns anything (true, false, a string, you name it), the execution of anything else after the return itself, is prevented.
If you don't use any kind of return, functions default to returning true, which means the JS code will keep on to the next function\declaration.

This gives you the option of manipulating elements and handle errors just before returning false and stopping the function from continuing to run.