运行 ❯
获取您
自己
的网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <h2>JavaScript Loops</h2> <p>A loop with a <b>continue</b> statement.</p> <p>A loop which will skip the step where i = 3.</p> <p id="demo"></p> <script> let text = ""; for (let i = 0; i < 10; i++) { if (i === 3) { continue; } text += "The number is " + i + "<br>"; } document.getElementById("demo").innerHTML = text; </script> </body> </html>