How does a return statement differ from break statement?.
If I have to exit an if condition, which one should I prefer, return or break?
How does a return statement differ from break statement?.
If I have to exit an if condition, which one should I prefer, return or break?
Break will only stop the loop while return inside a loop will stop the loop and return from the function.