What you need to know about this book
- Why should I read this book?
- How to read this book
- Sources of this book
- Demo code on GitHub
- About the author
- What you need to know about this book
1. About ECMAScript 6 (ES6)
- 1.1 TC39 (Ecma Technical Committee 39)
- 1.2 How ECMAScript 6 was designed
- 1.4 Upgrading to ES6
- 1.5 Goals for ES6
- 1.6 Categories of ES6 features
- 1.7 A brief history of ECMAScript
2. FAQ: ECMAScript 6
- 2.1 How can I use ES6 today?
- 2.2 Isn’t ECMAScript 6 now called ECMAScript 2015?
- 2.3 How do I migrate my ECMAScript 5 code to ECMAScript 6?
- 2.4 Does it still make sense to learn ECMAScript 5?
- 2.5 Is ES6 bloated?
- 2.6 Isn’t the ES6 specification very big?
- 2.7 Does ES6 have array comprehensions?
- 2.8 Is ES6 statically typed?
- 3.1 Versioning
- 3.2 Strict mode and ECMAScript 6
- 3.3 Breaking changes in ES6
- 3.4 Conclusion
- 3.5 Further reading
4. Core ES6 features
- 4.2 From IIFEs to blocks
- 4.3 From concatenating strings to template literals
- 4.4 From function expressions to arrow functions
- 4.5 Handling multiple return values
- 4.7 Handling parameter default values
- 4.8 Handling named parameters
argumentsto rest parameters
apply()to the spread operator (
concat()to the spread operator (
- 4.12 From function expressions in object literals to method definitions
- 4.13 From constructors to classes
4.14 From custom error constructors to subclasses of
- 4.15 From objects to Maps
- 4.16 New string methods
- 4.17 New Array methods
- 4.18 From CommonJS modules to ES6 modules
- 4.19 What to do next
- 4.1 From
- 1. About ECMAScript 6 (ES6)
5. New number and
- 5.1 Overview
- 5.2 New integer literals
5.3 New static
- 5.5 FAQ: numbers
6. New string features
- 6.1 Overview
- 6.2 Unicode code point escapes
- 6.3 String interpolation, multi-line string literals and raw string literals
- 6.4 Iterating over strings
- 6.5 Numeric values of code points
- 6.6 Checking for inclusion
- 6.7 Repeating strings
- 6.8 String methods that delegate regular expression work to their parameters
- 6.9 Reference: the new string methods
- 7.1 Overview
- 7.2 A new primitive type
- 7.3 Using symbols to represent concepts
- 7.4 Symbols as keys of properties
- 7.5 Converting symbols to other primitive types
- 7.6 Wrapper objects for symbols
- 7.7 Crossing realms with symbols
- 7.8 FAQ: symbols
7.9 The spelling of well-known symbols: why
- 7.10 The symbol API
8. Template literals
- 8.1 Overview
- 8.2 Introduction
- 8.3 Examples of using tagged template literals
- 8.4 Implementing tag functions
- 8.5 FAQ: template literals and tagged template literals
9. Variables and scoping
- 9.1 Overview
9.2 Block scoping via
constcreates immutable variables
- 9.4 The temporal dead zone
constin loop heads
- 9.6 Parameters as variables
- 9.7 The global object
- 9.8 Function declarations and class declarations
9.9 Coding style:
- 10.1 Overview
- 10.2 Background: Constructing data versus extracting data
- 10.3 Patterns for destructuring
- 10.4 How do patterns access the innards of values?
- 10.5 Default values
- 10.6 More object destructuring features
- 10.7 More Array destructuring features
- 10.8 You can assign to more than just variables
- 10.9 Pitfalls of destructuring
- 10.10 Examples of destructuring
- 10.11 The destructuring algorithm
11. Parameter handling
- 11.1 Overview
- 11.2 Parameter handling as destructuring
- 11.3 Parameter default values
- 11.4 Rest parameters
- 11.5 Simulating named parameters
- 11.6 Examples of destructuring in parameter handling
- 11.7 Coding style tips
11.8 The spread operator (
- 5. New number and
12. Callable entities in ECMAScript 6
- 12.1 Overview
- 12.2 Ways of calling in ES6
- 12.3 Recommendations for using callable entities
- 12.4 ES6 callable entities in detail
- 12.5 Dispatched and direct method calls in ES5 and ES6
nameproperty of functions
- 12.7 FAQ: callable entities
13. Arrow functions
- 13.1 Overview
13.2 Traditional functions are bad non-method functions, due to
- 13.3 Arrow function syntax
- 13.4 Lexical variables
- 13.5 Syntax pitfalls
- 13.6 Immediately-invoked arrow functions
13.7 Arrow functions versus
- 13.8 Arrow functions versus normal functions
- 13.9 FAQ: arrow functions
14. New OOP features besides classes
- 14.1 Overview
- 14.2 New features of object literals
14.3 New methods of
- 14.4 Traversing properties in ES6
- 14.5 Assigning versus defining properties
__proto__in ECMAScript 6
- 14.7 Enumerability in ECMAScript 6
- 14.8 Customizing basic language operations via well-known symbols
- 14.9 FAQ: object literals
- 15.1 Overview
- 15.2 The essentials
- 15.3 Private data for classes
- 15.4 Simple mixins
- 15.5 The details of classes
- 15.6 The details of subclassing
- 15.7 The species pattern
- 15.8 The pros and cons of classes
- 15.9 FAQ: classes
- 15.10 What is next for classes?
- 15.11 Further reading
- 16.1 Overview
- 16.3 The basics of ES6 modules
- 16.4 Importing and exporting in detail
- 16.5 The ECMAScript 6 module loader API
- 16.6 Using ES6 modules in browsers
- 16.7 Details: imports as views on exports
- 16.8 Design goals for ES6 modules
- 16.9 FAQ: modules
- 16.10 Advantages of ECMAScript 6 modules
- 16.11 Further reading
- 12. Callable entities in ECMAScript 6
- 17.1 Overview
17.2 Introducing the
for-ofonly works with iterable values
17.4 Iteration variables:
- 17.5 Iterating with existing variables, object properties and Array elements
- 17.6 Iterating with a destructuring pattern
18. New Array features
- 18.1 Overview
18.2 New static
- 18.4 ES6 and holes in Arrays
18.5 Configuring which objects are spread by
- 18.6 The numeric range of Array indices
19. Maps and Sets
- 19.1 Overview
- 19.2 Map
- 19.3 WeakMap
- 19.4 Set
- 19.5 WeakSet
- 19.6 FAQ: Maps and Sets
20. Typed Arrays
- 20.1 Overview
- 20.2 Introduction
- 20.3 ArrayBuffers
- 20.4 Typed Arrays
- 20.5 DataViews
- 20.6 Browser APIs that support Typed Arrays
- 20.7 Extended example: JPEG SOF0 decoder
- 20.8 Availability
21. Iterables and iterators
- 21.1 Overview
- 21.2 Iterability
- 21.3 Iterable data sources
- 21.4 Iterating language constructs
- 21.5 Implementing iterables
- 21.6 More examples of iterables
- 21.7 FAQ: iterables and iterators
- 21.8 The ECMAScript 6 iteration protocol in depth
- 22.1 Overview
- 22.2 What are generators?
- 22.3 Generators as iterators (data production)
- 22.4 Generators as observers (data consumption)
- 22.5 Generators as coroutines (cooperative multitasking)
- 22.6 Examples of generators
- 22.7 Inheritance within the iteration API (including generators)
- 22.8 Style consideration: whitespace before and after the asterisk
- 22.9 FAQ: generators
- 22.10 Conclusion
- 22.11 Further reading
- 17. The
V Standard library
23. New regular expression features
- 23.1 Overview
23.2 New flag
23.3 New flag
23.4 New data property
RegExp()can be used as a copy constructor
- 23.6 String methods that delegate to regular expression methods
24. Asynchronous programming (background)
- 24.2 The browser event loop
- 24.3 Receiving results asynchronously
- 24.4 Looking ahead
- 24.5 Further reading
25. Promises for asynchronous programming
- 25.1 Overview
- 25.2 Introduction: Promises
- 25.3 A first example
- 25.4 Three ways of understanding Promises
- 25.5 Creating and using Promises
- 25.6 Examples
- 25.7 Other ways of creating Promises
- 25.8 Chaining Promises
- 25.9 Common Promise chaining mistakes
- 25.10 Tips for error handling
- 25.11 Composing Promises
- 25.12 Two useful additional Promise methods
- 25.13 Node.js: using callback-based sync functions with Promises
- 25.14 ES6-compatible Promise libraries
- 25.15 Next step: using Promises via generators
- 25.16 Promises in depth: a simple implementation
- 25.17 Advantages and limitations of Promises
- 25.18 Reference: the ECMAScript 6 Promise API
- 25.19 Further reading
- 23. New regular expression features
26. Unicode in ES6
- 26.1 Unicode is better supported in ES6
- 26.2 Escape sequences in ES6
27. Tail call optimization
- 27.1 What is tail call optimization?
- 27.2 Checking whether a function call is in a tail position
- 27.3 Tail-recursive functions
28. Metaprogramming with proxies
- 28.1 Overview
- 28.2 Programming versus metaprogramming
- 28.3 Proxies explained
- 28.4 Use cases for proxies
- 28.5 The design of the proxy API
- 28.6 FAQ: proxies
- 28.7 Reference: the proxy API
- 28.8 Conclusion
- 28.9 Further reading
- 29. Coding style tips for ECMAScript 6
30. An overview of what’s new in ES6
- 30.1 Categories of ES6 features
30.2 New number and
- 30.3 New string features
- 30.4 Symbols
- 30.5 Template literals
- 30.6 Variables and scoping
- 30.7 Destructuring
- 30.8 Parameter handling
- 30.9 Callable entities in ECMAScript 6
- 30.10 Arrow functions
- 30.11 New OOP features besides classes
- 30.12 Classes
- 30.13 Modules
- 30.15 New Array features
- 30.16 Maps and Sets
- 30.17 Typed Arrays
- 30.18 Iterables and iterators
- 30.19 Generators
- 30.20 New regular expression features
- 30.21 Promises for asynchronous programming
- 30.22 Metaprogramming with proxies
- 26. Unicode in ES6
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
C++ Best PracticesJason Turner
Level up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
OpenIntro StatisticsDavid Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntro
A complete foundation for Statistics, also serving as a foundation for Data Science.
Leanpub revenue supports OpenIntro (US-based nonprofit) so we can provide free desk copies to teachers interested in using OpenIntro Statistics in the classroom and expand the project to support free textbooks in other subjects.
More resources: openintro.org.
Functional Design and ArchitectureAlexander Granin
Software Design in Functional Programming, Design Patterns and Practices, Methodologies and Application Architectures. How to build real software in Haskell with less efforts and low risks. The first complete source of knowledge.
Atomic KotlinBruce Eckel and Svetlana Isakova
For both beginning and experienced programmers! From the author of the multi-award-winning Thinking in C++ and Thinking in Java together with a member of the Kotlin language team comes a book that breaks the concepts into small, easy-to-digest "atoms," along with exercises supported by hints and solutions directly inside IntelliJ IDEA!
R Programming for Data ScienceRoger D. Peng
This book brings the fundamentals of R programming to you, using the same material developed as part of the industry-leading Johns Hopkins Data Science Specialization. The skills taught in this book will lay the foundation for you to begin your journey learning data science. Printed copies of this book are available through Lulu.
I am a Software Engineer and I am in ChargeAlexis Monville and Michael Doyle
I am a Software Engineer and I am in Charge is a real-world, practical book that helps you increase your impact and satisfaction at work no matter who you work with.
In the book, we will follow Sandrine, a fictional character who learns to think in a new way enabling her to take a different course of action.
C++20 is the next big C++ standard after C++11. As C++11 did it, C++20 changes the way we program modern C++. This change is, in particular, due to the big four of C++20: ranges, coroutines, concepts, and modules.
Invest In Digital Health - The Medical Futurist's GuideDr. Bertalan Mesko
Artificial Intelligence and Digital Health are booming. In this book, we explain why now it's a good time to invest in Digital Health and give recommendations on where to invest by looking at the top 24 technological trends we find the most promising.
Ansible for DevOpsJeff Geerling
Ansible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
The Hundred-Page Machine Learning BookAndriy Burkov
Everything you really need to know in Machine Learning in a hundred pages.
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
2 Books"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before...
CCIE Service Provider Ultimate Study Bundle
2 BooksPiotr Jablonski, Lukasz Bromirski, and Nick Russo have joined forces to deliver the only CCIE Service Provider training resource you'll ever need. This bundle contains a detailed and challenging collection of workbook labs, plus an extensively detailed technical reference guide. All of us have earned the CCIE Service Provider certification...
The Future of Digital Health
6 BooksWe put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy and how technology giants such as Amazon or Google want to conquer...
Cisco CCNA 200-301 Complet
4 BooksCe lot comprend les quatre volumes du guide préparation à l'examen de certification Cisco CCNA 200-301.
Modern Management Made Easy
3 BooksRead all three Modern Management Made Easy books. Learn to manage yourself, lead and serve others, and lead the organization.
CCDE Practical Studies (All labs)
3 BooksCCDE lab
Modern C++ by Nicolai Josuttis
"The C++ Standard Library" and "Concurrency with Modern C++"
2 BooksGet my books "The C++ Standard Library" and "Concurrency with Modern C++" in a bundle. The first book gives you the details you should know about the C++ standard library; the second one dives deeper into concurrency with modern C++. In sum, you get more than 600 pages full of modern C++ and about 250 source files presenting the standard library...
Linux Administration Complet
4 BooksCe lot comprend les quatre volumes du Guide Linux Administration :Linux Administration, Volume 1, Administration fondamentale : Guide pratique de préparation aux examens de certification LPIC 1, Linux Essentials, RHCSA et LFCS. Administration fondamentale. Introduction à Linux. Le Shell. Traitement du texte. Arborescence de fichiers. Sécurité...
Advanced Product Management
3 BooksGet The Art of Strategy, Product Discovery and Lean Product Management with a 20% discount.