Created
July 8, 2019 03:04
-
-
Save Kkan9ma/03c530c87390e5fbe13d27d02dec40d5 to your computer and use it in GitHub Desktop.
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Gugudan</title> | |
</head> | |
<body> | |
<h1>구구단 배열로 구현하기</h1> | |
<script> | |
var results = []; | |
for (var i = 2; i <= 9; i ++) { | |
document.write("<h2>" + i + "단</h2>"); | |
for (var j = 0; j < 9; j++) { | |
results[j] = i * (j + 1); | |
document.write(i + " * " + (j + 1) + " = " + results[j] + "<br>"); | |
} | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment