Last answered:

09 Jun 2026

Posted on:

29 May 2026

0

Resolved: Return outcome

Hi sir you mentioned a function can have single return yet here you used two returns ?
1 answers ( 1 marked as helpful)
Instructor
Posted on:

09 Jun 2026

0
Hi Abdishakuur!
Thanks for reaching out.

A function may contain multiple return statements, but only the first one that is reached will execute. In this example, return "Outcome"  ends the function immediately, so return result is never reached and is effectively ignored.

Hope this helps.
Best,
Tsvetelin

Submit an answer