π
To Uppercase
To Uppercaseμ
λ¬Έ λ¬Έμμ΄ +5pts
Problem
Write a function that converts a string to uppercase.
Examples
Input:
toUpper("hello")Output:
"HELLO"Explanation
μ΄ λ¬Έμ λ **toUpperCase() λ©μλ**λ₯Ό μ¬μ©νμ¬ λ¬Έμμ΄μ λλ¬Έμλ‘ λ³ννλ λ°©λ²μ νμ΅ν©λλ€. ## ν΅μ¬ κ°λ : λμλ¬Έμ λ³ν toUpperCase()λ λ¬Έμμ΄μ λͺ¨λ μλ¬Έμλ₯Ό λλ¬Έμλ‘ λ³νν©λλ€. ### κΈ°λ³Έ μ¬μ©λ² ```javascript str.toUpperCase() ``` - μλ³Έ λ¬Έμμ΄μ λ³κ²½λμ§ μμ΅λλ€ (λΆλ³μ±) - μλ‘μ΄ λ¬Έμμ΄μ λ°νν©λλ€ ### νμ© μμ ```javascript "hello".toUpperCase() // "HELLO" "Hello World".toUpperCase()...
View detailed explanation βKey Concepts
toUpperCase λ©μλ λμλ¬Έμ λ³ν λ¬Έμμ΄ λΆλ³μ± λ¬Έμμ΄ λΉκ΅
Time: O(n) Space: O(n)
solution.js
Ctrl + Enter
Run tests to see results here.