
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Set Size Property in JavaScript
The size property of the Set object returns number representing the number of elements in the current set object.
Syntax
Its Syntax is as follows
Obj.size();
Example
<html> <head> <title>JavaScript Example</title> </head> <body> <script type="text/javascript"> const setObj = new Set(); setObj.add('Java'); setObj.add('JavaFX'); setObj.add('JavaScript'); setObj.add('HBase'); document.write("Size of the Set object: "+setObj.size); </script> </body> </html>
Output
Size of the Set object: 4
Advertisements