.length
The .length
string property returns the number of characters in a string.
Syntax
string.length;
Example
Returning the length of a string in number:
console.log('I love New York!'.length);// Output: 16
The .length
string property returns the number of characters in a string.
string.length;
Returning the length of a string in number:
console.log('I love New York!'.length);// Output: 16