_.toUpper([string=‘’])

_.toUpper() 方法将字符串转换为大写。

参数

  • string (string): 要转换的字符串。

返回值

(string): 返回转换后的大写字符串。

示例

const result = _.toUpper("Hello World");
console.log(result);
// => 'HELLO WORLD'

在这个示例中,字符串 'Hello World' 被转换为大写,结果为 'HELLO WORLD'