Learning ECMA6
Libro: Exploring Ecma6
Table of contents
-
I Background
- 1. About ECMAScript 6 (ES6)
-
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
-
4. Core ES6 features
-
4.1 From
var
toconst
/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
toforEach()
tofor-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
-
4.1 From
-
II Data
-
5. New number and
Math
features -
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 notSymbol.ITERATOR
(etc.)? - 7.10 The symbol API
- 8. Template literals
- 9. Variables and scoping
-
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
-
5. New number and
-
III Modularity
- 12. Callable entities in ECMAScript 6
-
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
-
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 - 18. New Array features
- 19. Maps and Sets
- 20. Typed Arrays
- 21. Iterables and iterators
-
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
-
17. The
-
V Standard library
- 23. New regular expression features
- 24. Asynchronous programming (background)
-
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
- 27. Tail call optimization
- 28. Metaprogramming with proxies
- 29. Coding style tips for ECMAScript 6
-
30. An overview of what’s new in ES6
- 30.1 Categories of ES6 features {#overview-entry-about-es6.md}
-
30.2 New number and
Math
features {#overview-entry-numbers.md} - 30.3 New string features {#overview-entry-strings.md}
- 30.4 Symbols {#overview-entry-symbols.md}
- 30.5 Template literals {#overview-entry-template-literals.md}
- 30.6 Variables and scoping {#overview-entry-variables.md}
- 30.7 Destructuring {#overview-entry-destructuring.md}
- 30.8 Parameter handling {#overview-entry-parameter-handling.md}
- 30.9 Callable entities in ECMAScript 6 {#overview-entry-callables.md}
- 30.10 Arrow functions {#overview-entry-arrow-functions.md}
- 30.11 New OOP features besides classes {#overview-entry-oop-besides-classes.md}
- 30.12 Classes {#overview-entry-classes.md}
- 30.13 Modules {#overview-entry-modules.md}
-
30.14 The
for-of
loop {#overview-entry-for-of.md} - 30.15 New Array features {#overview-entry-arrays.md}
- 30.16 Maps and Sets {#overview-entry-maps-sets.md}
- 30.17 Typed Arrays {#overview-entry-typed-arrays.md}
- 30.18 Iterables and iterators {#overview-entry-iteration.md}
- 30.19 Generators {#overview-entry-generators.md}
- 30.20 New regular expression features {#overview-entry-regexp.md}
- 30.21 Promises for asynchronous programming {#overview-entry-promises.md}
- 30.22 Metaprogramming with proxies {#overview-entry-proxies.md}
- Notes
© 2015 - 2017 Axel Rauschmayer (cover by Fran Caye)
Babel ES6, ES7 y ES8
Esta sección está basada en unos apuntes elaborados por Daniel Ramos Acosta para una presentación en la asignatura SYTW en el curso 16/17:
- Autor: Daniel Ramos Acosta
- Fecha: 17/11/2016
- Presentación
Esta presentación trata sobre el uso de las nuevas características del estándar ECMAScript más interesantes, y su aplicación en Node.js, ya sea usando --harmony
, o mediante un transpilador como Babel.
Se irán viendo distintas funciones mediante ejemplos y de cómo se hacía antes y qué métodos existen actualmente que pueden ser mejores soluciones.