Lodash - toUpper method



Syntax

_.toUpper([string=''])

Converts string, as a whole, to upper case just like String#toUpperCase.

Arguments

  • [string=''] (string) − The string to convert.

Output

  • (string) − Returns the upper cased string.

Example

var _ = require('lodash');
var result = _.toUpper('fooBar');

console.log(result);

Save the above program in tester.js. Run the following command to execute this program.

Command

\>node tester.js

Output

FOOBAR
lodash_string.htm
Advertisements