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