Strings are a valid iterable so they can also be passed-in to initialize a set: console .log ( 'Only unique characters will be in this set.' The value of size is an integer representing how many entries the Map object has. The above image also shows the length of the object (that is 3) at the end. javascript documentation: Getting set length. Set.prototype.keys() – It also returns all the values from the Set in the insertion order. Read about initial: inherit: Inherits … Not necessarily an array. A value in the Set may only occur once; it is unique in the Set's collection. JavaScript Demo: Set.prototype.size. LIKE US. Use the following syntax to find the length … You can also use length property to set the size of an array. On the other hand Objects does not have a length property. JavaScript String length Property