hoe to find the length of string in node.js code example
Example 1: length of string in javascript
var str = "Hello World!";
var n = str.length;
Example 2: How to get length of string in javascript without using native length method
var str = userInput[0];
var count = 0;
while(str[count] !== undefined)
{
count += 1;
}
console.log(count)