length
Returns the length of a string.Response
Length is counted in UTF-16 code units, like JavaScript’s
String.length. Characters outside the Basic Multilingual Plane, such as most emoji, count as 2. "👋" has a length of 2.of isn’t a string, length returns -1 instead of an error.