我可以做这个:
let iter = mySet.values();
var val = iter.next();
var next = iter.next();
while(val.value){
if(!next.done){
// do something that I want to do to the last element
}
val = next;
next = iter.next();
}
但“下一个”变量似乎很笨拙。有没有更好的办法?
当我检查mySet对象时,我看到带有数组值的[[Entries]]键,但是我该如何访问呢?
MM们
慕工程0101907
相关分类