Some functions are designed to return a value while others have a job to do that doesn't require anything to be returned. Return means exit the function either way but, if the design of the function expects a value to be returned, it must follow return like return 23;
When you start coding, you usually put returns at the end of functions after the work has been done. But after a while returns are placed inside ifs and loops and you usually end up coding multiple returns depending on the state of the application.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Some functions are designed to return a value while others have a job to do that doesn't require anything to be returned. Return means exit the function either way but, if the design of the function expects a value to be returned, it must follow return like return 23;
When you start coding, you usually put returns at the end of functions after the work has been done. But after a while returns are placed inside ifs and loops and you usually end up coding multiple returns depending on the state of the application.