Set objects are collections of unique values. You can iterate through the elements of a set in insertion order. A value in the Set may only occur once; it is unique in the Set's collection. Sets are mutable, like everything in JS
Note that Javascript === equality semantics apply. JsSet does not know
anything about Scala equals method or the case classes structural equality.
The Map object holds key-value pairs and remembers the original insertion order of the keys. Any value (both objects and primitive values) may be used as either a key or a value. The Map is mutable, like everything in JS.
- See also:
- Companion:
- object
Value members
Constructors
Concrete methods
!! Not fully supported by IE - returns js.undefined instead of Set
!! Not fully supported by IE - returns js.undefined instead of Set
Note: this might be a bit slower than Scala.js js.Set.foreach implementation in
some browsers, however the native JS method works in IE 11, whereas the Scala.js
implementation uses JS iterables, which are not supported in any IE version.
Note: this might be a bit slower than Scala.js js.Set.foreach implementation in
some browsers, however the native JS method works in IE 11, whereas the Scala.js
implementation uses JS iterables, which are not supported in any IE version.