0
698views
State true or false with reason

A function can have any number of return statements.

1 Answer
0
6views

State true or false with reason
A function can have any number of return statements.
True
A function may have any number of return statements each returning different values and each return statements will not occur successively.
For eg:-
if(condition) { return value1; } else { return value2; }.
Here there are 2 return statements but only one would be returned.(i.e. If condition satisfied then value1 would be returned else value 2 would be returned)

Please log in to add an answer.