上QQ阅读APP看书,第一时间看更新
Sets
A set is like a list in that it's an indexed collection. There are two things about sets that are different from lists. First, sets can only hold unique values—duplicates are silently ignored. Second, the iteration order of sets isn't defined. This means that the index of a given value doesn't necessarily reflect the iteration order of the value:
import { Set } from 'immutable';
const mySet = Set();
console.log('Set', mySet instanceof Set);
// -> Set true