[프로그래머스] 문자열안에 문자열 (javascript)

몽슈뜨·2022년 12월 1일
0

programmers

목록 보기
36/62
post-thumbnail


🎯나의 풀이

function solution(str1, str2) {
    return str1.indexOf(str2) != -1 ? 1 : 2;
}
profile
개발자되면 맥북사줄께

0개의 댓글