"JavaScript 배열 indexOf()"의 두 판 사이의 차이

잔글 (Jmnote님이 자바스크립트 배열 indexOf() 문서를 JavaScript 배열 indexOf() 문서로 이동했습니다)
(차이 없음)

2023년 10월 28일 (토) 15:01 판

1 개요

JavaScript Array indexOf()
자바스크립트 배열 indexOf()
const arr = ["hello", "world", "hello"];
console.log(arr.indexOf("hello")); // 0
console.log(arr.indexOf("yellow")); // -1 (not exists)
console.log(arr.indexOf("hello", 2)); // 2

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}