Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
3회차 과제
정리 주제:
함수,배열,객체1. 함수
이 방식은 function 키워드를 생략할 수 있습니다.
콜백 함수란 함수의 인자로 전달되는 함수를 뜻합니다. 특정 작업이 끝난 후 실행할 함수를 넘길 때 사용합니다.
재귀 함수란 자기 자신을 호출하는 함수를 뜻합니다.
종료 조건을 두지 않는다면 함수가 무한히 작동되고, 스택오버플로우가 발생할 수 있습니다.
2. 배열
배열 요소 추가, 제거 함수
push(): 마지막에 요소 추가pop(): 마지막 요소 제거unshift(): 맨 앞에 요소 추가shift(): 맨 앞 요소 제거배열 순회 및 특수 함수
forEach(): 단순 순회map(): 배열의 각 요소를 변형filter(): 조건에 맞는 요소 추출find(): 조건에 맞는 첫 번재 요소 반환includes(): 특정 값 포함 여부 확인3. 객체
객체 접근 방식
user.nameuser["name"]객체 관련 내장 함수
Object.keys(): 모든 key(속성명) 을 배열로 반환Object.values(): 모든 value(값) 를 배열로 반환Object.entries(): [key, value] 쌍의 배열을 요소로 가진 배열 반환Object.assign(): 배열을 객체로 변환4. 구조 분해 할당