Update 2015-12-26: Sections for two caveats: “the name of a function is always assigned at creation” and “minification”
The name
property of a function contains its name:
> function foo() {}
> foo.name
'foo'
This property is useful for debugging (its value shows up in stack traces) and some metaprogramming tasks (picking a function by name etc.).
Prior to ECMAScript 6 (ES6), this property was already supported by most engines. With ES6, it becomes part of the language standard and is frequently filled in automatically.
Typed Arrays are an ECMAScript 6 API for handling binary data. This blog post explains how they work.
Three years ago, there was a lot of excitement surrounding Web Components: everybody talked about them, the frameworks Ember and Angular planned to integrate them or even be based on them, etc.
By now, that excitement seems to have died down. This blog post examines what happened to Web Components. Spoiler: they are alive and well and slowly being adopted across browsers.
This blog post shows how you can use a tagged template to log variables more efficiently.
In order to understand it, you should be familiar with ECMAScript 6 template literals and tagged templates. For an introduction, consult chapter “Template literals and tagged templates” of “Exploring ES6”.
A recent trend in the web development world is to use JavaScript on the server to assemble pages there, with the same code that is used to manage them in the client. That lets you initially see content faster, especially on mobile devices and helps with search engines.
How are we supposed to call code that runs on either server or client? Michael Jackson doesn’t like a recent proposal:
This blog post describes five little known facts about ECMAScript 5 (ES5) object literals:
When you have key-value data whose keys you don’t know in advance, it’s generally better to store it in an ES6 Map than in an object. But how do you convert Maps to and from JSON? This blog post tells you.
This blog post helps you to get started with ECMAScript 6 (ES6):
This blog post explains new regular expression features in ECMAScript 6. It helps if you are familiar with ES5 regular expression features and Unicode. Consult the following two chapters of “Speaking JavaScript” if you aren’t:
CommonJS modules export values, while ES6 modules export immutable bindings. This blog post explains what that means.
You should be loosely familiar with ES6 modules. If you aren’t, you can consult the chapter on modules in “Exploring ES6”.