mardi 3 février 2015

Is it safe to delete elements in a set while iterating with for..of?


Is it specified that you can delete any element in an instance of Set while iterating using for..of and that



  • you won't iterate more than once on an element

  • you won't miss any other element that was in the set at the start of the iteration other than the ones you remove


?


Is there a general guarantee of ES6 iterators regarding deletion while iterating using for..of ?





Aucun commentaire:

Enregistrer un commentaire