This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.
Smartphone icons created by Freepik - Flaticon
const cars = ["BMW", "Volvo", "Saab", "Ford"]; let text = ""; list: { text += cars[0] + "<br>"; text += cars[1] + "<br>"; break list; text += cars[2] + "<br>"; text += cars[3] + "<br>"; } document.getElementById("demo").innerHTML = text;
With a label reference, the break statement can be used to jump out of any code block. A code block is a block of code between { and }.