Just spotted strange behavior of JS's Set object and decided to ask stackoverflow community :)
So that's the problem:
Screen from console:
Code for copy-paste:
let a = new Set([1])
let b = new Set([2, 3])
a.add(...b) // result is set of {1, 2}
Problem is that set a
does not contain value 3
after add function call.
This behavior have an explanation or it's more like a bug?
Thanks in advance