변수
Last updated
Last updated
<script>
//변수 사용하지 않을 때
alert(100+10);
alert((100+10)/10);
alert(((100+10)/10)-10);
alert((((100+10)/10)-10)/10);
//변수를 사용할 때
a = 100; // 100에서 1000으로 바꿔야 한다면 a = 1000; 로 수정
a = a + 10;
alert(a); // 110
a = a / 10; // 11
alert(a); // 11
a = a - 10; // 1
alert(a); // 1
a = a * 10; // 10
alert(a); // 10 // 11~17 변하지 않는 코드 (유지보수코드)
</script>