Limitations: Generators, Exceptions, and Object Literals

Learn the limitations of arrow functions while creating generators, throwing exceptions, and returning object literals.

Can’t be generators

In the Using generator in an infinite iteration section, we created a generator function that produced an infinite sequence of prime numbers. The code is repeated here for your convenience.

Get hands-on with 1200+ tech skills courses.