알고리즘/프로그래머스
Lv.0 - 정수 찾기
hoj0806
2024. 5. 5. 21:21
문제
풀이코드
const solution = (list , n) => list.indexOf(n)!==-1?1:0
코드 설명
indexOf 메서드 사용