(프로그래머스) 문자열 내 p와 y의 개수

유지원·2022년 4월 20일
0

프로그래머스

목록 보기
31/66

문제 링크

https://programmers.co.kr/learn/courses/30/lessons/12916?language=javascript


Javascript

function solution(s){
    return s.toLowerCase().split("p").length === s.toLowerCase().split("y").length
}
profile
👋 https://github.com/ujw0712

0개의 댓글