Created
July 2, 2019 07:09
-
-
Save Kkan9ma/89ff219e41949a05e91c18c11d36aa24 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> | |
<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"> | |
</head> | |
<body> | |
<h2>조건문 연습 1</h2> | |
<script> | |
var a = prompt("숫자를 입력하세요"); | |
var num = Number(a); | |
if (a % 2 === 0) { | |
console.log("짝수입니다."); | |
} | |
else { | |
console.log("홀수입니다."); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment