Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/TheAlgorithms/JavaScript
/ union
Function
union
Cache/test/cacheTest.js:33–35 ·
view source on GitHub ↗
(...sets)
Source
from the content-addressed store, hash-verified
31
* @
return
{
new
Set}
32
*/
33
export
const
union = (...sets) => {
34
return
new
Set(sets.reduce((flatArray, set) => [...flatArray, ...set], []))
35
}
Callers
1
Memoize.test.js
File · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected