알파벳 카운터
- 문제
영어 문장을 입력받아, 알파벳의 개수를 세어 결과를 출력하는 앱을 만들어봅니다. 
const AlphabetCounter = {
  // 변수 초기화
  sentence: "",
  alphabetMap: {},
  
  // sentence 를 인자로 입력받아 AlphabetCounter의 sentence를 세팅
  setSentence: function (sentence) {
    this.sentence = sentence;
    return this;
  },
  // buildAlphabetMap은 AlphabetCounter의 sentence가 가진 각 알파벳의 개수를 세어 알파벳과 그 개수를 각각 키와 값으로 하는 객체를 만들고 
     alphabetMap에 저장
  // this.sentence 로부터 알파벳 맵을 만들어 this.alphabetMap에 저장하세요.
  buildAlphabetMap: function () {
    this.alphabetMap = 
        this.sentence
        .trim()
        .toLowerCase()
        .split("")
        .filter(c => c >= "a" && c <= "z")
        .reduce((map, char) => {
            if(!map[char]) map[char] = 0
            map[char]++
            return map
        }, {})
    return this;
  },
  buildResult: function () {
    // Object.entries()를 활용하여 [a: 1] [b: 2] 형태의 문자열을 만들어보세요.
    const resultString = 
        Object.entries(this.alphabetMap)
            .reduce((acc, [alphabet, freq]) => `${acc} [${alphabet}:${freq}]`, "")
            .trim()
    return `결과는 : ${resultString} 입니다.`;
  },
};
export default AlphabetCounter;
상대시간 표시기
- 문제
RelativeTime.diff(date) 는 또 다른 과거 시간 date를 인자로 받아, date와의 시간 차를 상대 시간으로 표시합니다. 
// 초를 기준으로 TimeMap을 작성
// 또한 연산을 위해 계산식으로 작성
const TimeMap = (() => {
  let min = 60;
  let hour = min * 60;
  let day = hour * 24;
  let week = day * 7;
  let month = week * 4;
  let year = month * 12;
  return { min, hour, day, week, month, year };
})();
function createTimeText(time, standard, suffix) {
  return `${Math.floor(time / standard)}${suffix} 전`;
}
const TimeTextMap = {
  [TimeMap.min]: '분',
  [TimeMap.hour]: '시간',
  [TimeMap.day]: '일',
  [TimeMap.week]: '주',
  [TimeMap.month]: '개월',
  [TimeMap.year]: '년',
};
const RelativeTime = {
  diff: date => {
    const seconds = (new Date() - date) / 1000;
    return Object.entries(TimeMap).reduce((text, [time, value]) => {
      // time : min, value : 60
      // seconds : 40
      if (seconds >= value)
        return createTimeText(seconds, value, TimeTextMap[value]);
      return text;
    }, '방금 전');
  },
};
export default RelativeTime;
복리 계산기 구현하기
- 문제
초기 예금액(principal), 이자율(interest rate), 이자 발생 빈도(frequency), 예치 기간(year)를 유저에게서 입력받아, 예치기간 후의 최종 금액(amount)을 계산합니다. 
- 복리 계산식
A = P(1 + r / n)^(n*t) 
- 여기서 A는 최종 금액을 의미합니다. P는 초기 금액, r은 이자율, n은 이자 발생 빈도, t는 예치기 간을 의미합니다. 이 식을 이용하여 최종 금액을 계산하여 유저에게 계산 값을 보여주세요.