Yes, you can use return instead of break … break is optional and is used to prevent “falling” through all the other case statements. So return can be used in a similar fashion, as return ends the function execution.
Read moreHow do you end a switch case?
You can use the break statement to end processing of a particular labeled statement within the switch statement. It branches to the end of the switch statement. Without break , the program continues to the next labeled statement, executing the statements until a break or the end of the statement is reached.
Read more