Return Statement

A return statement defines a return value that returns a value when the function completes.

A return statement consists of the following:

  • The return keyword
  • The value or expression that the function should return

A return statement can be an expression. The value that’s returned is whatever the expression evaluates to.