๋ฐ์ํ
https://school.programmers.co.kr/learn/courses/30/lessons/12916
function solution(s){
s = s.toUpperCase();
arr = s.split("");
let p = 0, y = 0;
arr.forEach((letter) => {
if(letter === 'P') {
p++;
} else if(letter === 'Y') {
y++;
}
})
return p == y
}
๋ฐ์ํ