Free email newsletter: “ES.next News

2015-10-25

Reader survey 2015

Dear readers!

If you would, please fill out my reader survey. It won’t take long and will help improve this blog. I will publish a summary of the results, once the survey is closed.

Last day of survey: Monday, November 9, 2015

Thank you!

Axel

2015-10-24

The traversal order of object properties in ES6

The ECMAScript 6 specification defines in which order the properties of an object should be traversed. This blog post explains the details.

2015-10-21

Influences on ECMAScript 6

This is a list of a few ECMAScript 6 features and what their influences were:

2015-10-20

2015-10-19

Why is there a “temporal dead zone” in ES6?

In ECMAScript 6, accessing a let or const variable before its declaration (within its scope) causes a ReferenceError. The time span when that happens, between the creation of a variable’s binding and its declaration, is called the temporal dead zone.

For more information, consult Sect. “The temporal dead zone” in “Exploring ES6”. Here, I’d like to answer two questions:

  • Why is there a temporal dead zone?
  • Why does typeof cause a ReferenceError for a variable in the TDZ?

2015-10-16

Running a simple web server from a shell

The classic command for running a simple web server from a shell is:

    python -m SimpleHTTPServer [«port»]

As a result, files are served at http://localhost:«port», with 8000 being the default if you omit the port.

2015-10-14

Modular HTML pages

Static generation: minimizing how much is re-generated

When statically generating HTML content, you face an interesting challenge: If the page frame (the “chrome” of a page) contains information that changes frequently, you need to re-generate all pages every time it does. One example of such information is a top 10 list of the pages that were most popular during the last 30 days.

2015-10-10

2015-10-08

Using the Google Analytics Core Reporting API from Node.js

This blog post explains how to use the Analytics Core Reporting API by Google from Node.js.

Let’s use that API to create a Node.js script analytics.js that downloads the top 10 most visited pages of your website.

2015-10-07

Intercepting method calls via ES6 Proxies

This blog post explains how to use ES6 Proxies to intercept method calls to an object.

Read chapter “Meta programming with proxies” in “Exploring ES6” for more information on Proxies.

2015-10-05

Enumerability in ECMAScript 6

Enumerability is an attribute of object properties. This blog post explains how it works in ECMAScript 6.

Let’s first explore what attributes are.

2015-10-02

Concatenating Typed Arrays

Typed Arrays don’t have a method concat(), like Arrays do. The work-around is to use the method

    typedArray.set(arrayOrTypedArray, offset=0)

2015-10-01

ES6: methods versus callbacks

There is a subtle difference between an object with methods and an object with callbacks.