JavaScript tips: The labeled statement

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…


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


Print Share Comment Cite Upload Translate Updates
APA

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/

MLA
" » JavaScript tips: The labeled statement." David Armendáriz | Sciencx - Saturday May 29, 2021, https://www.scien.cx/2021/05/29/javascript-tips-the-labeled-statement/
HARVARD
David Armendáriz | Sciencx Saturday May 29, 2021 » JavaScript tips: The labeled statement., viewed ,<https://www.scien.cx/2021/05/29/javascript-tips-the-labeled-statement/>
VANCOUVER
David Armendáriz | Sciencx - » JavaScript tips: The labeled statement. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/05/29/javascript-tips-the-labeled-statement/
CHICAGO
" » JavaScript tips: The labeled statement." David Armendáriz | Sciencx - Accessed . https://www.scien.cx/2021/05/29/javascript-tips-the-labeled-statement/
IEEE
" » JavaScript tips: The labeled statement." David Armendáriz | Sciencx [Online]. Available: https://www.scien.cx/2021/05/29/javascript-tips-the-labeled-statement/. [Accessed: ]
rf:citation
» JavaScript tips: The labeled statement | David Armendáriz | Sciencx | 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.

You must be logged in to translate posts. Please log in or register.