A

Admin • 833K Points
Coach

Q. What is the purpose of a return statement in a function?

  • (A) Returns the value and continues executing rest of the statements, if any
  • (B) Returns the value and stops the program
  • (C) Returns the value and stops executing the function
  • (D) Stops executing the function and returns the value
  • Correct Answer - Option(D)
  • Views: 19
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

The return statement causes the function to stop executing and to return the value of its expression (if any) to the caller.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.