touppercase()
时间: 2023-11-13 12:03:05 浏览: 8
JavaScript toUpperCase()方法使用详解
The touppercase() function is a built-in JavaScript function that converts all the characters in a string to uppercase letters and returns the new string.
Syntax:
```
string.toUpperCase()
```
Example:
```
let str = "hello world";
let uppercaseStr = str.toUpperCase();
console.log(uppercaseStr); // Output: HELLO WORLD
```
阅读全文