The String.length property returns an integer value that is the result of total number of characters in the string. Remember, the index of an array begins from 0. This property returns the number of characters in a string. the method counts the total characters in the string and returns it. Browser Support. I have to set a value ("OK") in a form field "TEST" when the text in another field "ATA" has a 4 character length. then the function is called as "ss.length". The above image also shows the length of the object (that is 3) at the end. It is also quite popular for its versatility across the platforms. For example, an array of length 7 can have 3 elements in it. javascript documentation: Getting set length. array.length : length is a final variable applicable for arrays.With the help of length variable, we can obtain the size of the array. The value of size is an integer representing how many entries the Map object has. Anyone know another way to find a length of a set? JavaScript String length Property