This tutorial and all other PDFNetJS tutorials use ES6 generator functions in JavaScript which are currently supported in Chrome, Firefox, and Opera, but may be unsupported in other browsers. If you are working with a browser without ES6 support, you can take a look at online ES6-to-ES5 transformers such as Facebook's regenerator.