Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 3x 3x 3x 1x 1x 1x | /**
* 任務:實作一個函式 `toUpperCase`,將輸入的字串轉換為大寫。
*
* 範例:
* toUpperCase("hello") 應該回傳 "HELLO"
* toUpperCase("world") 應該回傳 "WORLD"
*
* @param str - 一個需要被轉換為大寫的字串
* @returns - 回傳轉換後的大寫字串
*/
export function toUpperCase(str: string): string {
// 請在此處寫下你的程式碼
return str.toUpperCase();
}
toUpperCase("hello");
toUpperCase("world"); |