+ 1
How many return statements can be written in a function?
4 Respuestas
+ 6
Multiple return statements can be written but the first one that is called will exit the function and return whatever you choose to return.
+ 3
as many as return statements
0
a lot
0
see...when you write 'return' statement in any function whether it's a by-default or any defined function. when ..we reach the line where return statement will get execute it will get execute to return a value..this value can be used outside the function too.Note-the speciality of it is that when it gets executed it actually 'returns' leaving the further portion unexecuted..thus if you wrote a plenty of them..it will do 'return' after the first execution.