[프로그래머스] 369게임 (javascript)

몽슈뜨·2022년 11월 29일
0

programmers

목록 보기
23/62
post-thumbnail


🎯나의 풀이

function solution(order) {
    clap = [...(""+order)] //2,9,4,2,3
    
    count = 0
    for (i=0; i < clap.length; i++){
        if(clap[i] % 3 === 0) {
            count += 1
        } 
        
    }
    
    return count;
}
profile
개발자되면 맥북사줄께

0개의 댓글