Javascript examples for Statement:Quiz
Use the continue statement to not output the array's element "CSS".
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> var myArray = ["Javascript", "HTML", "CSS", "Ford"]; var text = "" var i;//from ww w . j a va 2s .c o m for (i = 0; i < myArray.length; i++) { if (myArray[i] === "CSS") continue; text += myArray[i] + "<br>"; } document.getElementById("demo").innerHTML = text; </script> </body> </html>