I am getting the error message ‘regeneratorRuntime is not defined’ on Intermediate Algorithm Scripting: Smallest Common Multiple
when I try to use the code I wrote at Least Common Multiple - codepen I have searched this problem on this forum and found a lengthy discussion Why do I get regeneratorRuntime is not defined? which I belive the solution someone found was to just rewrite the generator as a function. I did this already for my PrimeFactors function which I previously wrote as a generator earlier today and I just hope I don’t need to do the same for Prime. There was a closed ticket generators don’t work: regeneratorRuntime is not defined#35409 about this topic as well.
My question is should I refrain from using generators/iterators or is it a problem with my code? It runs fine in code pen as well as locally via node debugger. If I should not be using these generators, what other es6 functionality should I avoid for future problems?