Xah Web Dev Blog 2017-03

TypeScript Tutorial (basics of using TypeScript to translate ES2015 to ES5)

JS: Method Chaining and Function Composition (added ES2015 version)

Global Internet Usage Hour Pattern (code updated to JavaScript es2015 via TypeScript)

one major problem of JavaScript still is that there's no range function for array, even in ES2016. That means, you cannot avoid using for-loop.

JS: SVG Clock (now js ES2015 code in TypeScript)

JS: Range Function for Array (new ES2015 function)

JS: “instanceof” Operator (major rewrite)

JS: Date Object (minor update)

JS: Stopwatch (updated, added JS ES2015 code.)

Google Chrome has disabled the chrome://plugins settings page, starting with Google Chrome version 57 (released in 2017 March)

JS: Object.prototype.valueOf (new page)

JS: Array How-To (updated)

JS: List Properties (new page)

Seo Hack on Alexa

Google Releases a Open Source Serif Chinese Font


Understand JavaScript Iterable, Iterator, Generator Function and Generator

JavaScript ES2015 has new concepts of iterable, iterator, generator function and generator.

They are somewhat confusing and complex.

To understand them clearly, here's explanations, read in order.

  1. JS: Interface
  2. JS: Iterable
  3. JS: Iterator
  4. JS: for-of Loop
  5. JS: Generator Function
  6. JS: Generator

JS: Iterator Prototype

JS: Number.prototype (now, the number object reference is complete.)

new pages

new pages on encoding url.

JS: Number Object (new page)

JS: Arrow Function (updated)

JS: How to Convert ES5 to ES2015

survey. Web Design: Serif or Sans-Serif? (updated)

JS: Function Parameters (updated for ES2015)

JavaScript trick. If you want to use forEach with break, use JS: Array.prototype.every.

Spamer Email You Asking for Link Back

there's a new scam method. Real people email you, saying good things on your article, and ask you to link to their blog too.

although real person, but you can see the context is totally off. e.g. years old blog, or wrong community, non-specifics, etc.

The person is probably cheaply hired to look for web pages to email to ask for links.

If you do not reply, the person asks again in a couple of weeks. Repeat, up to 4 times.

See also: Web Spam, Scam, Blackhat SEO Collection

JS: Boolean Object (complete rewrite)

JS: Boolean.prototype (new page)

JS: true, false (complete write)

css z index

[see CSS: z-index]

JS: Array.prototype.find new in ES2015.

facebook browser console warning 2017 03 10
facebook browser console warning

JS: Sparse Array (updated)

Patreon me $5. Ask me question on patreon