In JavaScript, the return keyword ends function execution and specifies a value to be returned to the function caller. If no value is specified, undefined is returned. In Python, it also terminates the function call but returns None if no expression follows. C++ differs as it requires a return type in the function declaration. The return statement must match this declared type or else the program will not compile.