2011-08

An introduction to JSDoc

[2011-08-17] dev, javascript, jslang, jstools

Check out my book (free online): “Speaking JavaScript”. Updated version of this blog post: chapter “JSDoc: Generating API Documentation”.

Update 2011-08-19. Tweet from JSDoc’s creator, Michael Mathews:
Awesome article about JSDoc. I learned (er remembered) a few things from reading it myself! via @rauschma 2ality.com/2011/08/jsdoc-intro.html

JSDoc is the de facto standard for documenting JavaScript code. You need to know at least its syntax (which is also used by many other tools) if you publish code. Alas, documentation is still scarce, but this post can help – it shows you how to run JSDoc and how its syntax works. (The JSDoc wiki [2] is the main source of this post, some examples are borrowed from it.)

What is the correct media type for JavaScript source code?

[2011-08-15] dev, javascript, clientjs
Question: What media type should you use for JavaScript source code? Answer [via Brendan Eich] and explanations after the break.

JavaScript’s JSON API

[2011-08-06] dev, javascript, jslang
JSON is a plain text data storage format. This blog post describes what it is and how to work with it via an ECMAScript 5 API.

JavaScript performance: Array.prototype versus []

[2011-08-01] dev, javascript, jslang
Array.prototype contains many generic methods that can be applied to array-like objects. [] is a popular shortcut for accessing these methods. This post examines the pros and cons of using that shortcut.

Update: Inspired by a comment from Kevin Roberts, I’ve added a third way of accessing generic methods, and a conclusion.

2011-07

test262 – ensuring that JavaScript implementations comply with the ECMAScript specification

[2011-07-28] dev, javascript, jslang
With so many JavaScript implementations out there, how do you guarantee that all of them stay true to ECMA-262 (the ECMAScript language standard)? The answer is test262, a suite of tests to be run by an implementation. Quote from the test262 website:

ECMAScript.next: Array.from() and Array.of()

[2011-07-26] esnext, dev, javascript, jslang
Update 2014-05-08. Newer version of this post: “ECMAScript 6’s new array methods

On July 9th, Brendan Eich announced that Rick Waldron had prototyped [1] two new methods for ECMAScript.next: Array.from() and Array.of(). Both methods are also useful in current JavaScript.

JavaScript properties: inheritance and enumerability

[2011-07-16] dev, javascript, jslang
Update 2012-10-29:Properties in JavaScript” is a general introduction to how properties work.

This post examines how inheritance and enumerability affect operations on properties in JavaScript.

Programming: the benefits of taking a break

[2011-07-14] dev, software engineering
This post lists several benefits of taking a break during programming.

SourceMap on Firefox: source debugging for languages compiled to JavaScript [update: WebKit, too]

[2011-07-10] dev, firefox, javascript
Update 2011-09-16: Source maps are coming to WebKit, too. Mozilla and WebKit implementers might even agree on a common format.

More and more languages are compiled to JavaScript. Mozilla has plans to let you debug those languages in their source code (no need to look at JavaScript).

2011-06

A JavaScript glossary: ECMAScript, TC39, etc.

[2011-06-27] esnext, dev, javascript, jslang
This blog post explains the difference between JavaScript and ECMAScript. And the differences between ECMAScript.next, ECMAScript 6 and ECMAScript Harmony.