. This is similar to the Map object, so that each entry's key is the same as its value for a Set. If this set fits in the specified array with room to spare (i.e., the array has more elements than this set), the element in the array immediately following the end of the set is set to null. w3resource. Learning jQuery Fourth Edition Karl Swedberg and Jonathan Chaffer jQuery in Action Bear Bibeault, Yehuda Katz, and Aurelio De Rosa jQuery Succinctly Cody Lindley Content is available under these licenses. It is designed to prevent the user from physically typing in more than six characters. I have to set a value ("OK") in a form field "TEST" when the text in another field "ATA" has a 4 character length. Use the toString() method to covert the Number to string, then the length() method gives you length. A set accessor function for size is undefined; you cannot change this property. victor.js. var n = $ ( "div" ).length; $ ( "span" ).text ( "There are " + n + " divs." We can find the length of the string by the jQuery .length property.