length property of the String object returns the number of code points in a string object. It indicates the length of the string.
"scotch.io".length // 9
const stringLength = string.length
Returns a number
length property returns the number of code points in a given string. When called on an empty string, it returns
Verify password length
length property in conjunction with an if statement is used to verify the length of a password entry and returns a message if the length condition is satisfied or otherwise.
Like this article? Follow @iChuloo on Twitter