Kotlin Iterator - range-based for loop in JavaScript

@Alexey.Andreev, ah, of course, that makes sense. Thank you.

Well, since it’s a priority queue I decided it better to add a popAll method instead, but will try it out when I can get around to it and let you know if there is problem. Thank you for the reply :slight_smile: