I have a Set
of strings
const firstSet = new Set([
"a",
"b",
"c",
])
and I would like to create a copy of it but also add with "d"
and "e"
. I can do it like this:
const secondSet = new Set(firstSet)
secondSet.add("d")
secondSet.add("e")
but is there a shorter way?