ExamCompetition Forum Question Papers Ask A Question Mock Test Learn & Earn Sign Up Login Menu



0 vote

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

Asked on by | Votes 0 | Views: 23 | Tags: computer science     | javascript     | array and function     | Add Bounty

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


Share on Facebook      Share on Whatsapp       Share on Twitter




1 answers

0 vote
Answered by on | Votes 0 |

 Stops executing the function and returns the value



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

Join Telegram Group




Answer This Question

Name:
Email:
Answer :
Sum of (2+3)
Submit: