Exploring ES6
$29.00
Minimum price
$35.00
Suggested price

Exploring ES6

Upgrade to the next version of JavaScript

About the Book

  • Share this book

  • Categories

    • ES6

About the Author

Axel Rauschmayer
Axel Rauschmayer

Axel specializes in JavaScript and web development. He teaches classes for Ecmanauten, blogs at 2ality.com, holds talks and workshops at conferences and organizes the MunichJS user group.

Axel has been writing about ECMAScript 6 since early 2011.

Bundles that include this book

$64.99
Bought separately
$39.99
Bundle Price
$54.99
Bought separately
$44.99
Bundle Price
$43.00
Bought separately
$31.00
Bundle Price
$55.00
Bought separately
$39.00
Bundle Price
$63.00
Bought separately
$43.00
Bundle Price

Table of Contents

  •  
    • What you need to know about this book
      • Audience: JavaScript programmers
      • Why should I read this book?
      • How to read this book
      • Sources of this book
      • Glossary
      • Conventions
      • Demo code on GitHub
      • Sidebars
      • Footnotes
    • Foreword
    • Preface
    • Acknowledgements
    • About the author
  • I Background
    • 1. About ECMAScript 6 (ES6)
      • 1.1 TC39 (Ecma Technical Committee 39)
      • 1.2 How ECMAScript 6 was designed
      • 1.3 JavaScript versus ECMAScript
      • 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. One JavaScript: avoiding versioning in ECMAScript 6
      • 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.1 From var to const/let
      • 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.6 From for to forEach() to for-of
      • 4.7 Handling parameter default values
      • 4.8 Handling named parameters
      • 4.9 From arguments to rest parameters
      • 4.10 From apply() to the spread operator (...)
      • 4.11 From 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 Error
      • 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
  • II Data
    • 5. New number and Math features
      • 5.1 Overview
      • 5.2 New integer literals
      • 5.3 New static Number properties
      • 5.4 New Math functionality
      • 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. Symbols
      • 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 Symbol.iterator and not Symbol.ITERATOR (etc.)?
      • 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 let and const
      • 9.3 const creates immutable variables
      • 9.4 The temporal dead zone
      • 9.5 let and const in loop heads
      • 9.6 Parameters as variables
      • 9.7 The global object
      • 9.8 Function declarations and class declarations
      • 9.9 Coding style: const versus let versus var
    • 10. Destructuring
      • 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 (...)
  • III Modularity
    • 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
      • 12.6 The name property of functions
      • 12.7 FAQ: callable entities
    • 13. Arrow functions
      • 13.1 Overview
      • 13.2 Traditional functions are bad non-method functions, due to this
      • 13.3 Arrow function syntax
      • 13.4 Lexical variables
      • 13.5 Syntax pitfalls
      • 13.6 Immediately-invoked arrow functions
      • 13.7 Arrow functions versus bind()
      • 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 Object
      • 14.4 Traversing properties in ES6
      • 14.5 Assigning versus defining properties
      • 14.6 __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. Classes
      • 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. Modules
      • 16.1 Overview
      • 16.2 Modules in JavaScript
      • 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
  • IV Collections
    • 17. The for-of loop
      • 17.1 Overview
      • 17.2 Introducing the for-of loop
      • 17.3 Pitfall: for-of only works with iterable values
      • 17.4 Iteration variables: const declarations versus var declarations
      • 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 Array methods
      • 18.3 New Array.prototype methods
      • 18.4 ES6 and holes in Arrays
      • 18.5 Configuring which objects are spread by concat() (Symbol.isConcatSpreadable)
      • 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. Generators
      • 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
  • V Standard library
    • 23. New regular expression features
      • 23.1 Overview
      • 23.2 New flag /y (sticky)
      • 23.3 New flag /u (unicode)
      • 23.4 New data property flags
      • 23.5 RegExp() can be used as a copy constructor
      • 23.6 String methods that delegate to regular expression methods
    • 24. Asynchronous programming (background)
      • 24.1 The JavaScript call stack
      • 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
  • VI Miscellaneous
    • 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 Math features
      • 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.14 The for-of loop
      • 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
  • Notes

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

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) and EPUB (for phones, tablets and 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.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub