Created
June 20, 2021 18:43
-
-
Save whimsyniche/dbfd2e4a4c8f0d3ddbec324a9b37460f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<h2>Code CracklePop</h2> | |
<p id="print"></p> | |
<script> | |
let text = ""; | |
for (let i = 0; i < 101; i++) { | |
if (i%3 == 0 && i%5 == 0) { | |
text += i + "CracklePop" + "<br>"; | |
} | |
else if (i%3 == 0) { | |
text += i + "Crackle" + "<br>"; | |
} | |
else if (i%5 == 0) { | |
text += i + "Pop" + "<br>"; | |
} | |
else { | |
text += i + "" + "<br>"; | |
} | |
} | |
document.getElementById("print").innerHTML = text; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment