Do I have to include break?

Hello everyone,
I have just a doubt regarding this exercise included in the Back-end career path:

https://www.codecademy.com/paths/back-end-engineer-career-path/tracks/fscp-javascript-syntax-part-i/modules/fecp-learn-javascript-syntax-functions/projects/rock-paper-scissors-javascript

at point number 5 why has the “break” keyword been omitted inside the switch?

Thank you so much!!!

When the computer runs into break it exits the loop, but when it runs into return it exits the whole function.

Here, return is doing the job that break would normally do.

1 Like

Thank you so much :+1:

1 Like