Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 배열과 연결리스트의 차이
- 쌍방향 연결리스트
- 범용 선택자
- classList.contains(string)
- for..of
- map()
- indexOf
- Array.from()
- Em
- 백준알고리즘
- 객체
- filter()
- 고차함수
- nth-child()
- display : none
- invalid assignment left-hand side
- innerhtml
- 등차수열의 항 찾기
- 배열의 오름차순
- 단방향 연결리스트
- 양방향 연결리스트
- Sort
- 인접 형제 선택자 결합
- 배열의 내림차순
- visibility : hidden
- disabled
- CSS
- 가상 요소 선택자
- Link
- 일반 형제 선택자 결합
Archives
- Today
- Total
프론트엔드 센트럴파크 (☞゚ヮ゚)☞
3항 연산자 본문
변수 = (조건식) ? 참일 때 값 : 거짓일 때 값;
let age = 20;
// 조건문 if-else
if (age < 19) {
msg = "Not adult";
} else {
msg = "Adult";
}
console.log(msg); // Adult
// 3항 연산자
msg_another = age < 19 ? "Not adult" : "Adult";
console.log(msg_another); // Adult
'Javascript' 카테고리의 다른 글
for .. in 반복문 (0) | 2022.05.05 |
---|---|
조건문 switch (0) | 2022.04.30 |
논리 연산자 &&( and), ||(or), !(not) (0) | 2022.04.29 |
연산자 (0) | 2022.04.29 |
얕은복사 (0) | 2022.04.28 |
Comments