[기본미션] p139 3번 문제
[학습내용] chapter 03
조건문
let age = Math.floor(Math.random() * 20) + 1
// if
if (age < 18) n = 0
else n = 1
// switch
switch (Math.floor(age / 9)) {
case 0:
case 1:
n = 0
break;
default:
n = 1
}
// conditional operator
age = age !== undefined ? age : 20
age = age || 20
week3 https://big-mango.tistory.com/152
week2 https://big-mango.tistory.com/149
week1 https://big-mango.tistory.com/146
'혼공' 카테고리의 다른 글
week2-python (0) | 2023.07.16 |
---|---|
week2-java (0) | 2023.07.15 |
week1-python (0) | 2023.07.09 |
week1-java (0) | 2023.07.09 |
week1-javascript (0) | 2023.07.03 |