Can A Function Be Defined Without A Return Statement?

Category: QuestionsCan A Function Be Defined Without A Return Statement?
Editor">Editor Staff asked 2 years ago

Can A Function Be Defined Without A Return Statement?

1 Answers
Editor">Editor Staff answered 2 years ago

No, a function cannot be defined without a RETURN statement because it has to return a value back to the calling environment. In case a RETURN statement is not defined, runtime error is raised.