0 / 60 seg.

What is the correct way to obtain the length of a string in JavaScript?

const str = "Hello, world!";