Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/marijnh/Eloquent-JavaScript
/ add
Method
add
code/solutions/06_3_iterable_groups.js:4–8 ·
view source on GitHub ↗
(value)
Source
from the content-addressed store, hash-verified
2
#members = [];
3
4
add(value) {
5
if
(!this.has(value)) {
6
this.#members.push(value);
7
}
8
}
9
10
delete(value) {
11
this.#members = this.#members.filter(v => v !== value);
Callers
1
from
Method · 0.95
Calls
1
has
Method · 0.95
Tested by
no test coverage detected