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
In ECMAScript 6, accessing a
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:
ReferenceErrorfor a variable in the TDZ?
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.
Complementary and indispensable: “ECMAScript 6 compatibility table” by kangax.
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.