Strings are sets of characters in javascript. Like any other JS primitive element, a string is a kind of object. This means they have some in-built properties and methods. Like the .length (an integer, the number of characters in a string), and many more.
W3 Schools has a page for strings as well as string methods.
The length property returns the length of a string:
click the button below to find the length of the string "ABCDEFGHIJKLMNOPQRSTUVWXYZ" (the alphabet)
As always, read this file with a text editor to see how the function in the button works