calculate length of string javascript code example
Example 1: js string length
let str = "foo";
console.log(str.length);
// 3
Example 2: javascript check string lenght
let SomeString = "Example";
console.log(SomeString.length)
Example 3: javascript string length
const s = 'Hello, World!';
console.log(s.length);