String length
length
length
property returns the string’s length.
Example
1. find length of the string: name
.
let name = "apple";
let len = name.length;
console.log(len);
length
length
property returns the string’s length.
1. find length of the string: name
.
let name = "apple";
let len = name.length;
console.log(len);
Copyright @2022