How to Convert String to Uppercase using Node Js?
Feb 01, 2022 . Admin
Hello Friends,
Now let's see example of how to convert string to uppercase. We will check how to convert string to uppercase. This is a short guide on convert string to uppercase in node js. Let's get started with how to convert string to uppercase in node js.
Here i will give you many example how to convert string to uppercase using node js.
Example 1 :
Run following command to create node app.
mkdir my-app cd my-app npm initStep 2 : Create server.js file
server.js
var convertUpper = "mywebtuts tutorial".toUpperCase(); console.log(convertUpper)
now you can simply run by following command:
node server.jsOutput :
MYWEBTUTS TUTORIAL
Example 2 :
Step 1 : Create Node AppRun following command to create node app.
mkdir my-app cd my-app npm initStep 2 : Create server.js file
server.js
var str = "my webtuts tutorial."; var strResult = str.toUpperCase(); console.log(strResult);
now you can simply run by following command:
node server.jsOutput :
MY WEBTUTS TUTORIAL.
It will help you...