Have fun, don't waste these years worrying about the future, you'll get plenty of time in the next 50/60 years to do that but you'll never get your youth back.
function * getNext(){
let i = 2;
while(true){
i = i * 2;
yield i;
}
}
Here, no closure needed.