Created
September 7, 2020 09:39
-
-
Save firdaushqq/c1652df14386d5c8f5c60929e7bb4648 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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Firdaus Haqiqi XI RPL 3</title> | |
<link rel="stylesheet" href="BuatIf.css" type="text/css"> | |
</head> | |
<body> | |
<p id="cobaan"> | |
Penggunaan <b>ELSE IF</b> bertujuan untuk mengganti <b>IF</b> dalam jumlah banyak | |
</p> | |
<script> | |
var d = new Date() | |
var time = d.getHours() | |
if (time < 9){ | |
document.write("Selamat Pagi!"); | |
}else if (time >= 12 && time < 3){ | |
document.write("Hari yang panas"); | |
}else{ | |
document.write("Hello World!"); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment