*html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
const date = new Date()
const hours = date.getHours()
if(hours < 11){
alert('아침식사 시간입니다')
}
else if (hours <= 17){
alert("점심시간 입니다")
}
else{
alert("저녁시간 입니다.")
}
</script>
</body>
</html>
*결과:
x
x
자바를 이용하면서 새로운것을 배워가는 즐거움을 느낌