[2013-12-28] A low-level JavaScript API for SIMD is another avenue for parallelization (within a single processer core).
JavaScript is still a very sequential language. That is slowly changing. This blog post describes ParallelJS, an effort to bring data parallelism to JavaScript.
It is not a frequent use case, but it comes up occasionally: Producing an array [1] of a given length that is filled with values. This blog post explains how to do it and what to watch out for.
[1] is an introduction to ECMAScript 6 modules and how they can be used in current browsers. In contrast, this blog post explains how future browsers will support them natively. As part of that support, we will get the <module> tag, a better version of the <script> tag.
By now, you are probably familiar with immediately invoked function expressions (IIFEs, [1]). This blog post looks at immediately invoked constructors and immediately invoked object literals.
Update 2013-11-05: I take a look at the C code of typeof to better explain why typeof null results in 'object'.
In JavaScript, typeof null is 'object', which incorrectly suggests that null is an object (it isn’t, it’s a primitive value, consult my blog post on categorizing values for details). This is a bug and one that unfortunately can’t be fixed, because it would break existing code. Let’s explore the history of this bug.
In most JavaScript engines, there is a global object console with methods for logging and debugging. That object is not part of the language proper, but has become a de facto standard, since being pioneered by the Firebug debugger. Since their main purpose is debugging, the console methods will most frequently be used during development and rarely in deployed code.
This blog post gives an overview of the methods of console.
JavaScript can only safely represent integers i in the range −253 < i < 253. This blog post examines why that is and what “safely represent” means. It is based on an email by Mark S. Miller to the es-discuss mailing list.