JavaScript Question: How Does the switch Statement Work?

preview_player
Показать описание
The switch statement sometimes gets ignored because of its complex syntax. In this tutorial we talk about when to use JavaScript switch and explain how it works.
For a complete list of all our tutorials:

Take the Learn Modern JavaScript: Getting Started or the Learn Modern JavaScript: Advanced Topics courses at a huge discount:
Рекомендации по теме
Комментарии
Автор

Finally I understood the switch statement!

antjeplatte
Автор

It is very clear now! Thank you very much:)

mariabesiada
Автор

great tutorials, thankyou so much steven

shabnamnaaz
Автор

Why did the second case run if it didn't equal to 10 when you took out the break?

bgmyhan
Автор

Very clear, and thank you for explaining when to use switch versus else/if. ^_^

carpathianshepherdess