Last active
July 13, 2017 14:01
-
-
Save crissyg/549d38b6ee256ca0a0454066676cc553 to your computer and use it in GitHub Desktop.
Displays product of n * 2 .
This file contains hidden or 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> | |
<head> | |
<link rel="stylesheet" href="style.css"> | |
<script src="script.js"></script> | |
</head> | |
<body> | |
<h1>Product!</h1> | |
<p id ="product"></p> | |
<script> | |
var p = ""; | |
var i; | |
for (i = 1; i <=12; i++) { | |
p += "The product of " +i+" * "+" 2 = "+ i*2 + "<br>"; | |
} | |
document.getElementById("product").innerHTML = p; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment