Leanpub Header

Skip to main content

Exploring ES2016 and ES2017

This book covers what’s new in ES2016 and ES2017. FREE ONLINE: http://exploringjs.com/es2016-es2017.html

The author is letting you choose the price you pay for this book!

Pick Your Price...
PDF
EPUB
WEB
About

About

About the Book

Price

Pick Your Price...

Minimum price

$15.00

$20.00

You pay

$20.00

Author earns

$16.00
$

All prices are in US $. You can pay in US $ or in your local currency when you check out.

EU customers: prices exclude VAT, which is added during checkout.

...Or Buy With Credits!

Number of credits (Minimum 1)

1
The author will earn $12.00 from your purchase!
You can get credits monthly with a Reader Membership

Author

About the Author

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.

Contents

Table of Contents

What you need to know about this book

  1. Support

About the author

  1. IBackground

1.The TC39 process for ECMAScript features

  1. 1.1Who designs ECMAScript?
  2. 1.2How is ECMAScript designed?
  3. 1.2.1Problem: ECMAScript 2015 (ES6) was too large a release
  4. 1.2.2Solution: the TC39 process
  5. 1.3Don’t call them ECMAScript 20xx features
  6. 1.4Further reading

2.FAQ: ES2016 and ES2017

  1. 2.1Isn’t ECMAScript 2016 too small?
  2. IIECMAScript 2016

3.Array.prototype.includes

  1. 3.1Overview
  2. 3.2The Array method includes
  3. 3.3Frequently asked questions
  4. 3.4Further reading

4.Exponentiation operator (**)

  1. 4.1Overview
  2. 4.2An infix operator for exponentiation
  3. 4.3Examples
  4. 4.4Precedence
  5. 4.5Further reading
  6. IIIECMAScript 2017

5.Async functions

  1. 5.1Overview
  2. 5.1.1Variants
  3. 5.1.2Async functions always return Promises
  4. 5.1.3Handling results and errors of asynchronous computations via await
  5. 5.2Understanding async functions
  6. 5.2.1Writing asynchronous code via generators
  7. 5.2.2Writing asynchronous code via async functions
  8. 5.2.3Async functions are started synchronously, settled asynchronously
  9. 5.2.4Returned Promises are not wrapped
  10. 5.3Tips for using await
  11. 5.3.1Don’t forget await
  12. 5.3.2You don’t need await if you “fire and forget”
  13. 5.3.3await is sequential, Promise.all() is parallel
  14. 5.4Async functions and callbacks
  15. 5.4.1Array.prototype.map()
  16. 5.4.2Array.prototype.forEach()
  17. 5.5Tips for using async functions
  18. 5.5.1Know your Promises
  19. 5.5.2Immediately Invoked Async Function Expressions
  20. 5.5.3Unit testing with async functions
  21. 5.5.4Don’t worry about unhandled rejections
  22. 5.6Further reading

6.Shared memory and atomics

  1. 6.1Parallelism vs. concurrency
  2. 6.1.1Models of parallelism
  3. 6.2A history of JS parallelism
  4. 6.2.1The next step: SharedArrayBuffer
  5. 6.3Shared Array Buffers
  6. 6.3.1Creating and sending a Shared Array Buffer
  7. 6.3.2Receiving a Shared Array Buffer
  8. 6.4Atomics: safely accessing shared data
  9. 6.4.1Problem: Optimizations make code unpredictable across workers
  10. 6.4.2Solution: atomics
  11. 6.4.3Problem: torn values
  12. 6.5Shared Array Buffers in use
  13. 6.5.1Shared Array Buffers and the run-to-completion semantics of JavaScript
  14. 6.5.2Shared Array Buffers and asm.js and WebAssembly
  15. 6.5.3Sharing data other than integers
  16. 6.5.4How much faster is code that uses Shared Array Buffers?
  17. 6.6Example
  18. 6.6.1Using a shared lock
  19. 6.6.2Implementing a shared lock
  20. 6.6.3Conclusion for the example
  21. 6.7The API for shared memory and atomics
  22. 6.7.1SharedArrayBuffer
  23. 6.7.2Atomics
  24. 6.8FAQ
  25. 6.8.1What browsers support Shared Array Buffers?
  26. 6.9Further reading

7.Object.entries() and Object.values()

  1. 7.1Overview
  2. 7.1.1Object.entries()
  3. 7.1.2Object.values()
  4. 7.2Object.entries()
  5. 7.2.1Setting up Maps via Object.entries()
  6. 7.2.2FAQ: Object.entries()
  7. 7.3Object.values()

8.New string methods: padStart and padEnd

  1. 8.1Overview
  2. 8.2Why pad strings?
  3. 8.3String.prototype.padStart(maxLength, fillString=' ')
  4. 8.3.1A simple implementation of padStart()
  5. 8.4String.prototype.padEnd(maxLength, fillString=' ')
  6. 8.5FAQ: padStart and padEnd
  7. 8.5.1Why aren’t the padding methods called padLeft and padRight?

9.Object.getOwnPropertyDescriptors()

  1. 9.1Overview
  2. 9.2Object.getOwnPropertyDescriptors()
  3. 9.3Use cases for Object.getOwnPropertyDescriptors()
  4. 9.3.1Use case: copying properties into an object
  5. 9.3.2Use case: cloning objects
  6. 9.3.3Use case: cross-platform object literals with arbitrary prototypes
  7. 9.4Pitfall: copying methods that use super

10.Trailing commas in function parameter lists and calls

  1. 10.1Overview
  2. 10.2Trailing commas in object literals and Array literals
  3. 10.3Feature: allow trailing commas in parameter definitions and function calls

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 earned over $14 million writing, 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