Front/JS & jQuery
[js] indexOf()
오선지♬
2023. 9. 19. 20:19
728x90
반응형
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
Array.prototype.indexOf() - JavaScript | MDN
indexOf() 메서드는 배열에서 지정된 요소를 찾을 수 있는 첫 번째 인덱스를 반환하고 존재하지 않으면 -1을 반환합니다.
developer.mozilla.org
arr.indexOf(searchElement[, fromIndex])
배열을 찾는 요소의 시도. 발견되지 않는 경우 -1.
728x90
반응형