我怎么取到对应的值以及长度呢?
var set = new Set([1, 2, 3, 4, 4,4,4,4,2,2,2]); console.log(set)
Questions about using the JS set method - Q&A on the PHP Chinese website - Questions about using the JS set method - Q&A on the PHP Chinese website
Take a look around and learn.
length: set.size;get value: let origin = Array.from(set);
Questions about using the JS set method - Q&A on the PHP Chinese website - Questions about using the JS set method - Q&A on the PHP Chinese website
Take a look around and learn.