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
This question was posed to me in exam.
Question is taken from Defining and Invoking Functions in chapter Lexical Structures of JavaScript
Select the correct answer from above options
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)