Skip to Main Content
Advanced JavaScript
book

Advanced JavaScript

by Zachary Shute
January 2019
Intermediate to advanced content levelIntermediate to advanced
330 pages
6h 42m
English
Packt Publishing
Content preview from Advanced JavaScript

Appendix

About

This section is included to assist the students in performing the activities in the book. It includes detailed steps that are to be performed by the students to achieve the objectives of the activities.

Chapter 1: Introducing ECMAScript 6

Activity 1 – Implementing Generators

You have been tasked with building a simple app that generates numbers in the Fibonacci sequence upon request. The app generates the next number in the sequence for each request and resets the sequence it is given an input. Use a generator to generate the Fibonacci sequence. If a value is passed into the generator, reset the sequence. You may start the Fibonacci sequence at n=1 for simplicity.

To highlight how the generators can be used to build iterative ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Advanced JavaScript Topics

Advanced JavaScript Topics

Steven Hancock
JavaScript

JavaScript

T. J. Crowder
JavaScript Cookbook, 3rd Edition

JavaScript Cookbook, 3rd Edition

Adam D. Scott, Matthew MacDonald, Shelley Powers

Publisher Resources

ISBN: 9781789800104Supplemental Content