Labeledanimal cell

Any break or continue that references label must be contained within the statement that's labeled by label. Think about label as a variable that's only available in the scope of statement.

You can use a label to identify a statement, and later refer to it using a break or continue statement. Note that JavaScript has no goto statement; you can only use labels with break or continue.

Labeledmicroscope

Image

Image

Labeledskeleton

Image

Labeledheart

Note how the continue itemIteration; statement skips the rest of the tests for the current item as well as the statement that updates the itemsPassed counter, and continues with the next item. If you don't use a label, you would need to use a boolean flag instead.

The labeled function declaration syntax is deprecated and you should not use it, even in non-strict code. You cannot actually jump to this label within the function body.

Labeledplant cell

Labels can only be applied to statements, not declarations. There is a legacy grammar that allows function declarations to be labeled in non-strict code:

Labeleddiagram

Notice the difference with the previous continue example: when break loop1 is encountered, the execution of the outer loop is terminated, so there are no further logs beyond "i = 1, j = 0"; when continue loop1 is encountered, the execution of the outer loop continues at the next iteration, so only "i = 1, j = 1" and "i = 1, j = 2" are skipped.

A labeled statement is any statement that is prefixed with an identifier. You can jump to this label using a break or continue statement nested within the labeled statement.

continue label; can only be used if statement is one of the looping statements. If a continue label; statement is encountered when executing statement, execution of statement continues at the next iteration of the loop. continue; without a label can only continue the innermost loop, while continue label; allows continuing any given loop even when the statement is nested within other loops.

Packing for a fire assignment can be a daunting task, particularly because many fire assignments come with short notice. Developing a system to have your gear ready to go at a moment’s notice is a critical aspect of being prepared for wildland fire, and for making an assignment as comfortable as possible. In most structural fire departments, being ready for a long duration assignment to a wildland or wildland urban interface (WUI) fire is not something that is taught; firefighters are left to figure it out and often get caught missing some important items when they show up at a fire camp. Having a system for being ready can make life easier for long assignments as well as short ones.Pack It UpBeing assigned to a wildland fire on an engine has its advantages. With a vehicle comes the ability to pack for comfort, and the key is to do so in such a way as to be prepared for assignments of varied length.Anyone with some backpacking experience can attest to the fact that a systematic and organized packing process can make life a lot easier in the field. Over the years, I’ve developed a handy system for getting the things I need (and want) to fit into pretty small packages. I pack in stages, keeping the things I know I will need the most easily accessible and the less important items stowed away.I use a three-tiered system for keeping my gear ready. I divide fire assignments into short, medium and long categories. The short assignment, or initial attack, requires only PPE and my line gear. I keep my line pack ready to go all year, and it stays in the station with the rest of my gear in the rack. The medium assignment, or extended attack, requires personal effects and equipment for between two and five days. I keep this ready to roll at moment’s notice year round as well. Finally, there is the 14-day assignment, or campaign fire, that requires everything you might need for anything that extends past the five- to six-day assignment and on up to 21 days.Line GearAll wildland firefighters must carry some sort of line gear. A well-stocked and carefully packed line pack can easily get you through the first day or two of firefighting. My line pack not only has what I need to keep comfortable for a long day or two, but also has everything I might need on the fire line–spare batteries, radio clam shell, GPS, a bag full of snacks, one spare pair of socks, a first aid kit, pens and paper, etc. I think of my line pack as a sort of fire briefcase, complete with what I need to get the job done.The Red BagWhen it comes time for spending the night on the fireline, sleeping in the engine often leads to sore necks and poor rest. This is where the red bag comes in. Known by wildland fire crews for decades, the red bag gives a firefighter room to pack everything they need to sleep in comfort.Where I live and work, many assignments last three to four days, and the red bag is perfect for that amount of time; it has everything I need neatly packed into stuff sacks. Undergarments, a spare Nomex shirt, T-shirts and pair of sweats for sleeping all fit pretty handily into one stuff sack. I also carry a small stove with some instant coffee and a freeze-dried dinner or two (I can’t tell you how many times I was glad to have those!). Also stuffed in my red bag is a tent, made as compact as possible with a compression bag. In the front pocket, I stuff toiletries, a cell phone charger and a headlamp. Finally, the bag contains my sleeping bag (handily stored in the compartment designed for it) and an inflatable sleeping pad. I could survive for several days with this bag and my line gear alone, and would be even more comfortable if there is more food stashed somewhere on the engine. All of this equipment fits in one bag and weighs about 40 lbs.Campaign DuffelFor the longer assignments I bring along an extra duffel bag, packed in the same way, with all the needed comforts–extra socks, underwear, shirts, pants, and the all-important flip-flops for the camp shower. Don’t forget an empty (preferably waterproof) stuff sack for those undergarments you wore for the 105-degree, 16-hour line-digging tour; nothing is worse than having your clean clothes smell just as bad as your dirty ones.It’s also nice to have some spare PPE. I always carry an extra pair of gloves and a spare pair of clean Nomex pants and a shirt. While many wildland firefighters out there like to wear their sweat and ash on their clothes like a badge of honor, I prefer to smell a little better rather than looking like I rolled down a burned hillside.The final piece of my packing is a briefcase. If you are operating as the engine boss, strike team leader, or in another leadership role, you’ll no doubt need a complement of paperwork. I keep a well-stocked briefcase of incident command system forms–including crew time reports, unit logs, various incident organizers and incident management guides–with me at all times. Translating personnel and equipment time from notes scribbled on napkins always leads to trouble, so keeping these forms handy will make your job easier when it comes time to get your crew paid.Develop a SystemThere are many ways to keep your gear organized. Developing a system that is consistent and efficient will help make sure that you are always ready to go on that fire assignment and are never left missing something that you really need. Talking to fellow firefighters who have worked on wildland fires for a while is a good way to glean tips and tricks on how to pack for long-duration assignments.Sidebar – Pack It UpLine Pack Inventory

You can label statements other than loops, such as simple blocks, but only break statements can reference non-loop labels.

A JavaScript statement. break can be used within any labeled statement, and continue can be used within labeled looping statements.

If a break label; statement is encountered when executing statement, execution of statement terminates, and execution continues at the statement immediately following the labeled statement.

Labeledmap

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Non-plain functions, such as generator functions and async functions can neither be labeled in strict code, nor in non-strict code:

Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.Portions of this content are ©1998–2024 by individual mozilla.org contributors. Content available under a Creative Commons license.