Learn how to get the JavaScript String length
When you need to find the length of a JavaScript string, you can use the .length
property, which is available for any JavaScript string
you have in your code.
The following .length
property value returns 11
because the string
is 11 characters long:
let str = "Hello World";
console.log(str.length); // 11
#javascript #programming