5.
What method is used to determine the length of a string in JavaScript?
.length()
.length
.len()
.len
Correct: B
In JavaScript, the .length property is used to determine the length of a string. The property does not have parentheses, so A1 (.length()) and A3 (.len()) are incorrect. A4 (.len) is not a valid property or method for determining the length of a string in JavaScript.