The return keyword is only allowed inside functions, because it serves to exit immediately from a function and return a value to the caller of the function.
See Also Errors