Movatterモバイル変換


[0]ホーム

URL:


Exploring ES6
Homepage
Please support this book:buy it (PDF, EPUB, MOBI) ordonate
(Ad, please don’t block.)

Table of contents

    1. What you need to know about this book
      1. Audience: JavaScript programmers
      2. Why should I read this book?
      3. How to read this book
      4. Sources of this book
      5. Glossary
      6. Conventions
      7. Demo code on GitHub
      8. Sidebars
      9. Footnotes
    2. Foreword
    3. Preface
    4. Acknowledgements
    5. About the author
  1. IBackground
    1. 1.About ECMAScript 6 (ES6)
      1. 1.1TC39 (Ecma Technical Committee 39)
      2. 1.2How ECMAScript 6 was designed
      3. 1.3JavaScript versus ECMAScript
      4. 1.4Upgrading to ES6
      5. 1.5Goals for ES6
      6. 1.6Categories of ES6 features
      7. 1.7A brief history of ECMAScript
    2. 2.FAQ: ECMAScript 6
      1. 2.1How can I use ES6 today?
      2. 2.2Isn’t ECMAScript 6 now called ECMAScript 2015?
      3. 2.3How do I migrate my ECMAScript 5 code to ECMAScript 6?
      4. 2.4Does it still make sense to learn ECMAScript 5?
      5. 2.5Is ES6 bloated?
      6. 2.6Isn’t the ES6 specification very big?
      7. 2.7Does ES6 have array comprehensions?
      8. 2.8Is ES6 statically typed?
    3. 3.One #"ch_one-javascript.html#sec_versioning">3.1Versioning
    4. 3.2Strict mode and ECMAScript 6
    5. 3.3Breaking changes in ES6
    6. 3.4Conclusion
    7. 3.5Further reading
  2. 4.Core ES6 features
    1. 4.1Fromvar toconst/let
    2. 4.2From IIFEs to blocks
    3. 4.3From concatenating strings to template literals
    4. 4.4From function expressions to arrow functions
    5. 4.5Handling multiple return values
    6. 4.6Fromfor toforEach() tofor-of
    7. 4.7Handling parameter default values
    8. 4.8Handling named parameters
    9. 4.9Fromarguments to rest parameters
    10. 4.10Fromapply() to the spread operator (...)
    11. 4.11Fromconcat() to the spread operator (...)
    12. 4.12From function expressions in object literals to method definitions
    13. 4.13From constructors to classes
    14. 4.14From custom error constructors to subclasses ofError
    15. 4.15From objects to Maps
    16. 4.16New string methods
    17. 4.17New Array methods
    18. 4.18From CommonJS modules to ES6 modules
    19. 4.19What to do next
  • IIData
    1. 5.New number andMath features
      1. 5.1Overview
      2. 5.2New integer literals
      3. 5.3New staticNumber properties
      4. 5.4NewMath functionality
      5. 5.5FAQ: numbers
    2. 6.New string features
      1. 6.1Overview
      2. 6.2Unicode code point escapes
      3. 6.3String interpolation, multi-line string literals and raw string literals
      4. 6.4Iterating over strings
      5. 6.5Numeric values of code points
      6. 6.6Checking for inclusion
      7. 6.7Repeating strings
      8. 6.8String methods that delegate regular expression work to their parameters
      9. 6.9Reference: the new string methods
    3. 7.Symbols
      1. 7.1Overview
      2. 7.2A new primitive type
      3. 7.3Using symbols to represent concepts
      4. 7.4Symbols as keys of properties
      5. 7.5Converting symbols to other primitive types
      6. 7.6Wrapper objects for symbols
      7. 7.7Crossing realms with symbols
      8. 7.8FAQ: symbols
      9. 7.9The spelling of well-known symbols: whySymbol.iterator and notSymbol.ITERATOR (etc.)?
      10. 7.10The symbol API
    4. 8.Template literals
      1. 8.1Overview
      2. 8.2Introduction
      3. 8.3Examples of using tagged template literals
      4. 8.4Implementing tag functions
      5. 8.5FAQ: template literals and tagged template literals
    5. 9.Variables and scoping
      1. 9.1Overview
      2. 9.2Block scoping vialet andconst
      3. 9.3const creates immutable variables
      4. 9.4The temporal dead zone
      5. 9.5let andconst in loop heads
      6. 9.6Parameters as variables
      7. 9.7The global object
      8. 9.8Function declarations and class declarations
      9. 9.9Coding style:const versuslet versusvar
    6. 10.Destructuring
      1. 10.1Overview
      2. 10.2Background: Constructing data versus extracting data
      3. 10.3Patterns for destructuring
      4. 10.4How do patterns access the innards of values?
      5. 10.5Default values
      6. 10.6More object destructuring features
      7. 10.7More Array destructuring features
      8. 10.8You can assign to more than just variables
      9. 10.9Pitfalls of destructuring
      10. 10.10Examples of destructuring
      11. 10.11The destructuring algorithm
    7. 11.Parameter handling
      1. 11.1Overview
      2. 11.2Parameter handling as destructuring
      3. 11.3Parameter default values
      4. 11.4Rest parameters
      5. 11.5Simulating named parameters
      6. 11.6Examples of destructuring in parameter handling
      7. 11.7Coding style tips
      8. 11.8The spread operator (...)
  • IIIModularity
    1. 12.Callable entities in ECMAScript 6
      1. 12.1Overview
      2. 12.2Ways of calling in ES6
      3. 12.3Recommendations for using callable entities
      4. 12.4ES6 callable entities in detail
      5. 12.5Dispatched and direct method calls in ES5 and ES6
      6. 12.6Thename property of functions
      7. 12.7FAQ: callable entities
    2. 13.Arrow functions
      1. 13.1Overview
      2. 13.2Traditional functions are bad non-method functions, due tothis
      3. 13.3Arrow function syntax
      4. 13.4Lexical variables
      5. 13.5Syntax pitfalls
      6. 13.6Immediately-invoked arrow functions
      7. 13.7Arrow functions versusbind()
      8. 13.8Arrow functions versus normal functions
      9. 13.9FAQ: arrow functions
    3. 14.New OOP features besides classes
      1. 14.1Overview
      2. 14.2New features of object literals
      3. 14.3New methods ofObject
      4. 14.4Traversing properties in ES6
      5. 14.5Assigning versus defining properties
      6. 14.6__proto__ in ECMAScript 6
      7. 14.7Enumerability in ECMAScript 6
      8. 14.8Customizing basic language operations via well-known symbols
      9. 14.9FAQ: object literals
    4. 15.Classes
      1. 15.1Overview
      2. 15.2The essentials
      3. 15.3Private data for classes
      4. 15.4Simple mixins
      5. 15.5The details of classes
      6. 15.6The details of subclassing
      7. 15.7The species pattern
      8. 15.8The pros and cons of classes
      9. 15.9FAQ: classes
      10. 15.10What is next for classes?
      11. 15.11Further reading
    5. 16.Modules
      1. 16.1Overview
      2. 16.2Modules in JavaScript
      3. 16.3The basics of ES6 modules
      4. 16.4Importing and exporting in detail
      5. 16.5The ECMAScript 6 module loader API
      6. 16.6Using ES6 modules in browsers
      7. 16.7Details: imports as views on exports
      8. 16.8Design goals for ES6 modules
      9. 16.9FAQ: modules
      10. 16.10Advantages of ECMAScript 6 modules
      11. 16.11Further reading
  • IVCollections
    1. 17.Thefor-of loop
      1. 17.1Overview
      2. 17.2Introducing thefor-of loop
      3. 17.3Pitfall:for-of only works with iterable values
      4. 17.4Iteration variables:const declarations versusvar declarations
      5. 17.5Iterating with existing variables, object properties and Array elements
      6. 17.6Iterating with a destructuring pattern
    2. 18.New Array features
      1. 18.1Overview
      2. 18.2New staticArray methods
      3. 18.3NewArray.prototype methods
      4. 18.4ES6 and holes in Arrays
      5. 18.5Configuring which objects are spread byconcat() (Symbol.isConcatSpreadable)
      6. 18.6The numeric range of Array indices
    3. 19.Maps and Sets
      1. 19.1Overview
      2. 19.2Map
      3. 19.3WeakMap
      4. 19.4Set
      5. 19.5WeakSet
      6. 19.6FAQ: Maps and Sets
    4. 20.Typed Arrays
      1. 20.1Overview
      2. 20.2Introduction
      3. 20.3ArrayBuffers
      4. 20.4Typed Arrays
      5. 20.5DataViews
      6. 20.6Browser APIs that support Typed Arrays
      7. 20.7Extended example: JPEG SOF0 decoder
      8. 20.8Availability
    5. 21.Iterables and iterators
      1. 21.1Overview
      2. 21.2Iterability
      3. 21.3Iterable data sources
      4. 21.4Iterating language constructs
      5. 21.5Implementing iterables
      6. 21.6More examples of iterables
      7. 21.7FAQ: iterables and iterators
      8. 21.8The ECMAScript 6 iteration protocol in depth
    6. 22.Generators
      1. 22.1Overview
      2. 22.2What are generators?
      3. 22.3Generators as iterators (data production)
      4. 22.4Generators as observers (data consumption)
      5. 22.5Generators as coroutines (cooperative multitasking)
      6. 22.6Examples of generators
      7. 22.7Inheritance within the iteration API (including generators)
      8. 22.8Style consideration: whitespace before and after the asterisk
      9. 22.9FAQ: generators
      10. 22.10Conclusion
      11. 22.11Further reading
  • VStandard library
    1. 23.New regular expression features
      1. 23.1Overview
      2. 23.2New flag/y (sticky)
      3. 23.3New flag/u (unicode)
      4. 23.4New data propertyflags
      5. 23.5RegExp() can be used as a copy constructor
      6. 23.6String methods that delegate to regular expression methods
    2. 24.Asynchronous programming (background)
      1. 24.1The JavaScript call stack
      2. 24.2The browser event loop
      3. 24.3Receiving results asynchronously
      4. 24.4Looking ahead
      5. 24.5Further reading
    3. 25.Promises for asynchronous programming
      1. 25.1Overview
      2. 25.2Introduction: Promises
      3. 25.3A first example
      4. 25.4Three ways of understanding Promises
      5. 25.5Creating and using Promises
      6. 25.6Examples
      7. 25.7Other ways of creating Promises
      8. 25.8Chaining Promises
      9. 25.9Common Promise chaining mistakes
      10. 25.10Tips for error handling
      11. 25.11Composing Promises
      12. 25.12Two useful additional Promise methods
      13. 25.13Node.js: using callback-based sync functions with Promises
      14. 25.14ES6-compatible Promise libraries
      15. 25.15Next step: using Promises via generators
      16. 25.16Promises in depth: a simple implementation
      17. 25.17Advantages and limitations of Promises
      18. 25.18Reference: the ECMAScript 6 Promise API
      19. 25.19Further reading
  • VIMiscellaneous
    1. 26.Unicode in ES6
      1. 26.1Unicode is better supported in ES6
      2. 26.2Escape sequences in ES6
    2. 27.Tail call optimization
      1. 27.1What is tail call optimization?
      2. 27.2Checking whether a function call is in a tail position
      3. 27.3Tail-recursive functions
    3. 28.Metaprogramming with proxies
      1. 28.1Overview
      2. 28.2Programming versus metaprogramming
      3. 28.3Proxies explained
      4. 28.4Use cases for proxies
      5. 28.5The design of the proxy API
      6. 28.6FAQ: proxies
      7. 28.7Reference: the proxy API
      8. 28.8Conclusion
      9. 28.9Further reading
    4. 29.Coding style tips for ECMAScript 6
    5. 30.An overview of what’s new in ES6
      1. 30.1Categories of ES6 features
      2. 30.2New number andMath features
      3. 30.3New string features
      4. 30.4Symbols
      5. 30.5Template literals
      6. 30.6Variables and scoping
      7. 30.7Destructuring
      8. 30.8Parameter handling
      9. 30.9Callable entities in ECMAScript 6
      10. 30.10Arrow functions
      11. 30.11New OOP features besides classes
      12. 30.12Classes
      13. 30.13Modules
      14. 30.14Thefor-of loop
      15. 30.15New Array features
      16. 30.16Maps and Sets
      17. 30.17Typed Arrays
      18. 30.18Iterables and iterators
      19. 30.19Generators
      20. 30.20New regular expression features
      21. 30.21Promises for asynchronous programming
      22. 30.22Metaprogramming with proxies
  • Notes
  • © 2015 - 2018 Axel Rauschmayer (cover by Fran Caye)
    This book is dedicated to the impossible girl, who has taught me so much about love and life.

    [8]ページ先頭

    ©2009-2025 Movatter.jp