This code is supposed to skip the number 7 because there is a declaration of var using === operator. My question is what do we need to make it include number 7. Is it because it has been declared as variable and hence its ignoring it. 7 can be a variable right? or is it an integer value ?
<!DOCTYPE html>
<html>
<body>
<p>A loop with a <mark>continue</mark> statement.</p>
<p>loop will skip the iteration where k = 7.</p>
<p id="maddy"></p>
<script>
var text = "";
var k;
for (k = 0; k < 10; k++) {
if (k === 7) {
continue;
}
text += "The number is " + k + "<br>";
}
document.getElementById("maddy").innerHTML =
text;
</script>
</body>
</html>