Why do declarations return undefined? Is there any technical reason for them to?
A benefit if declaration returned the values of their variables would be that I could write something like:
while((var next = generator.next())) doSomething(next);
Because of the specification, I need to declare next in a scope it doesn't belong.
(Note: is there somewhere better to ask this question? It's possible this question is controversial and not just technical.)