String.toUpperCase() 會將字串中的所有字母轉換為大寫。
var str = 'hello world'; str.toUpperCase();
這個方法不會修改原字串,而是回傳新字串。
常用於搜尋比對、格式標準化與顯示處理。