The _.upperCase() method is used to converts the entire string to as space-separated words, to upper case.
Syntax:
_.upperCase( [string = ''])
Parameters: This method accepts a single parameter as mentioned above and described below:
- string: This parameter holds the string to convert.
Return Value: This method returns the upper case string.
Below examples illustrate Lodash _.upperCase() method in JavaScript:
Example 1:
Javascript
// Requiring the lodash library const _ = require("lodash"); // Use of _.upperCase() method console.log(_.upperCase('Geeks-For-Geeks')); console.log(_.upperCase('#--GeeksForGeeks--#')); |
Output:
'GEEKS FOR GEEKS' 'GEEKS FOR GEEKS'
Example 2:
Javascript
// Requiring the lodash library const _ = require("lodash"); // Given string let str = "Hello Geeks!"; // Use of _.upperCase() method console.log(_.upperCase(str)); |
Output:
'HELLO GEEKS'

… [Trackback]
[…] Here you can find 21639 more Information on that Topic: geeksforgeeks.org/lodash-uppercase-method-2/ […]
… [Trackback]
[…] Find More Info here to that Topic: geeksforgeeks.org/lodash-uppercase-method-2/ […]
… [Trackback]
[…] Find More here on that Topic: geeksforgeeks.org/lodash-uppercase-method-2/ […]
… [Trackback]
[…] Read More here to that Topic: geeksforgeeks.org/lodash-uppercase-method-2/ […]