Hi

Why do I get a “regeneratorRuntime is not defined” error while attempting the Project Euler Primes Summation problem? I used the javascript form of this recipe. As you can see I have used a generator function.

What am I doing wrong?

The code:

```
function primeSummation(n) {
var nxt=0, sum=0, ps=erat();
for (let nxt of ps) {
if (nxt<n) {sum+=nxt;}
else {break;}
}
return sum;
function* erat() {
var D={}, q=2;
while (true) {
p=D[q]; delete D[q];
if (p) {
x=p+q;
while (x in D) {x+=p}
D[x]=p;
}
else {
D[q*q]=q;
yield q;
}
q+=1;
}
}
}
```