📜
Title Case
Title Case보통 문자열 +20pts
Problem
Write a function that capitalizes the first letter of each word.
Examples
Input:
titleCase("hello world")Output:
"Hello World"Explanation
이 문제는 **split, map, join**을 조합하여 제목 형식(Title Case)으로 변환하는 방법을 학습합니다. ## 핵심 개념: 문자열 변환 파이프라인 여러 문자열 메서드를 체이닝하여 복잡한 변환을 수행합니다. ### 접근 방법 ```javascript str.split(' ') .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) .join(' ') ``` ### 단계별 분석 1. split(' '): 공백으로 단어 분리 2...
View detailed explanation →Key Concepts
split-map-join 패턴 문자열 체이닝 Title Case 문자열 변환
Time: O(n) Space: O(n)
solution.js
Ctrl + Enter
Run tests to see results here.