La estructura selectiva switch nos puede remplazar en algunas circunstancias una serie de if anidados, como veremos no es en todos los casos, solo en los casos que se verifican igualdades con ciertos valores.
Para ver su funcionamiento y sintaxis primero lo resolveremos el problema utilizando instrucciones if y luego empleando el switch.
------------------------------------------------------------------------------------------------
CURSOS
👉🏻 Encuentra todos mis cursos en www.codersfree.com
-----------------------------------------------------------------------
DONACIONES
Patreon: https://www.patreon.com/join/codersfree
PayPal: https://www.paypal.com/paypalme/CodersFreePeru
Continue this lesson in the app
Install CourseHive on Android or iOS to keep learning while you move.
FAQs
We curate free YouTube courses, organized by category and language — and make it easy for you to track your learning progress.
Yes. Free courses are embedded YouTube videos.
Currently available in English — with Portuguese, Spanish, French, German, and Italian coming soon.
Check ratings, reviews, duration, and description.
All courses include a certificate of participation.
Yes, an account lets you track progress, earn certificates, and save favorites.
We auto-save your watch position so you can resume on any device.