how to see string.length in js code example Example: js string length let str = "foo"; console.log(str.length); // 3