<script>
document.write('hello wrold');
</script>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<input type="button" value="hi" onclick="alert('hi')">
</body>
</html>
=== 란?
동등비교연산자
1===1
1과 1이 같습니까?
<script>
document.write(1===1)
</script>
값으로 true가 나옴
<h3>1<1</h3>
<script>
document.write(1<1);
</script>
1이 1보다 크다?
false
동등연산자 ===
좌항과 우항의 결과값을 ture or false 로 출력
ture or false 같은 결과 값을 boolean 이라고 함
Number 숫자
String 문자
Boolean true or false (단, 두개의 테이터 타입)
document.querySelector('#night_day') -----> this
var target = document.querySelector('body');
var coworkers = ["a", "b", "c","d"];
document.write('<li>1</li>');
var i = 0
while (i < 3) {
document.write('<li>2</li>');
document.write('<li>3</li>');
}
document.write('<li>4</li>');
<script>
var cowokers = ['egoing','leezhe','duru','taeho'];
</script>
<h2>Co workers</h2>
<ul>
<script>
var i = 0;
while (i < cowokers.length) {
document.write('<li>'+cowokers[i]+'</li>');
i = i + 1 ;
}
</script>
</ul>
오늘 배운 부분 정확히 이해하고 복습!
😢 목표하고자 했던 양만큼 공부를 못했다. 반성..