Skip to main content

대문자 찾기

문제#

한 개의 문자열을 입력받아 해당 문자열에 알파벳 대문자가 몇 개 있는지 알아내는 프로그램 을 작성하세요.

로직#

function solution(str){             var answer = 0;    for(var x of str){        if(x===x.toUpperCase()) answer++;     }
    return answer;}
solution("KoreaTimeGood");