What is set and how to add and remove elements from set?

Set is an unordered collection of uniquely stored data. You can use add method and remove method to perform operation respectively.

SetacctSet = new Set(); acctSet.add(‘hey’); // add a specific value acctSet.remove(‘hey’); // remove a specific value

About the author

By Rohit

Recent Posts

Recent Comments