javascript `new Set()` instead of an empty array?
Closed this issue · 3 comments
frederikhors commented
Why don't you use javascript new Set()
instead of an empty array?
usernamus commented
@frederikhors, what are the advantages?
frederikhors commented
Native methods like .had, .add, .delete.
usernamus commented
new Set()
has a limited number of features. Much smaller than the array.
I want to use a simple method to remove one item from the array, but in the case of new Set() it's not so simple.
If you know how to implement this, please make a pull request and show your implementation option.
Anyway thanks for your issue.