How do you find the length of a string in JavaScript? code example Example: js string length let str = "foo"; console.log(str.length); // 3