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 | 31 |
Tags
- Em
- classList.contains(string)
- display : none
- 범용 선택자
- 백준알고리즘
- Sort
- 가상 요소 선택자
- visibility : hidden
- filter()
- nth-child()
- 인접 형제 선택자 결합
- 배열의 오름차순
- 일반 형제 선택자 결합
- invalid assignment left-hand side
- 단방향 연결리스트
- CSS
- 고차함수
- disabled
- Link
- innerhtml
- 등차수열의 항 찾기
- for..of
- 배열과 연결리스트의 차이
- Array.from()
- indexOf
- map()
- 배열의 내림차순
- 양방향 연결리스트
- 쌍방향 연결리스트
- 객체
Archives
- Today
- Total
목록findIndex() (1)
프론트엔드 센트럴파크 (☞゚ヮ゚)☞

const members = ['나는', '가만히', '있고', '싶다']; const result = members.findIndex(function(member) { return member == '누워'; }); console.log(result); const members = ['나는', '가만히', '누워', '있고', '싶다']; const result = members.findIndex(function(member) { return member == '누워'; }); console.log(result); 배열에 값이 없는 경우 -1 배열에 값이 있는 경우 2 why? 배열의 인덱스를 찾기 때문이다. -1 인 경우는 => 없는 인덱스
Javascript
2022. 6. 11. 20:53