205k views
2 votes
What is the purpose of a return statement in a function?

1 Answer

2 votes

Answer:

To exit the function and pass a value back to the calling code.

User Mdemolin
by
8.2k points