What is the correct way to obtain the length of a string in JavaScript?
const str = "Hello, world!";
str.size()
str.len()
str.getLength()
str.length