This content originally appeared on DEV Community and was authored by David Armendáriz
What if you type in the console something like this?
label: {}
You won't have any errors. This is valid JS!
It turns out you can reference loops in Javascript. This was something I did not know a few days ago, but is a really cool and helpful feature in Javascript. In the following video, I explain you with examples how to use labeled statements.
This content originally appeared on DEV Community and was authored by David Armendáriz
David Armendáriz | Sciencx (2021-05-29T15:47:36+00:00) JavaScript tips: The labeled statement. Retrieved from https://www.scien.cx/2021/05/29/javascript-tips-the-labeled-statement/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.