To find the length of the string we use length method. The length property returns the length of a string (number of characters we use).The length of an empty string is 0.
For example:
function myFunction() {
var str = "Hello World!";
var n = str.length;
Hope this hepls.
Copyright © 2026 eLLeNow.com All Rights Reserved.