Converting a value to string in JavaScript

In JavaScript, there are three main ways in which any value can be converted to a string. This blog post explains each way, along with its advantages and disadvantages.


Arguments in favor or the “iPad mini”

A smaller version of the iPad has been rumored for quite some time. Recently, rumors have become more concrete: An “iPad mini” might come out before the end of the year, with a screen size of 7.85 inch. The article “Apple Has 163 Reasons To Release Fabled ‘iPad mini’” (by A.T. Faust III for AppAdvice) provides interesting arguments in favor of that theory. Highlights:


CSS Grid Layout is coming to Firefox in 2012

So far, HTML5 has been severely lacking when it comes to flexible GUI layouting. All that changed when Microsoft created CSS Grid Layout [1], which, among other things, is used to write the native HTML5 applications for Windows 8 [2]. That standard provides everything that people are familiar with from desktop GUI kits (such as Java SWT). Alas, so far, Microsoft was the only one who implemented this standard in a browser. Now that has changed: CSS Grid Layout will be added to Firefox in 2012 – as mentioned in section “CSS Flexbox and CSS Grid” of “Firefox in 2011 – Firefox plans for 2012” (by Robert Nyman for Mozilla Hacks).

In case you are wondering whether “CSS Grid” is the same as “CSS Grid Layout”, there are several similarly named specifications floating around, but they really are just different versions of the same standard:

  1. CSS Grid Positioning Module Level 3” (5 September 2007)
  2. Grid Layout” (22 March 2012)
  3. W3C Editor’s Draft: “CSS Grid Layout” (22 March 2012)
As an additional tidbit, the Firefox Platform 2012 Roadmap mentions that Work on CSS Grid Layout will start after CSS Flexbox, which is slated to be finished by Q2 2012.

Example layout:

  • auto: assign a size so that the content fits comfortably.
  • minmax(min-content, 1fr): the minimum size is min-content (the smallest size that still allows the content to be shown); the maximum size is “1fr”, a fraction value indicating to assign 100% of the additional space that remains after all maximum sizes have been reached.
Note: there are no absolute units such as pixels.
[Source of image: “CSS Grid Layout”]


  1. CSS3 Grid Layout is perfect for webapp GUIs
  2. A Windows 8 keynote review by a JavaScript programmer and Apple user


JavaScript’s two zeros

JavaScript has two zeros: −0 and +0. This post explains why that is and where it matters in practice.


Dallas Fed advocates breaking up large banks

The Federal Reserve Bank of Dallas (Dallas Fed) has issued its annual report. In it, it calls for a breakup of large banks. These are currently considered “too big to fail” (TBTF). The report argues that that is anti-capitalist.


Israelis and Iranians use Facebook to declare their solidarity

The article “Israeli-Iranian solidarity exchange sweeps Facebook” (by Dimi Reider for +972 Magazine) reports on a touching campaign on Facebook:


What are the most popular JavaScript keywords?

Ariya Hidayat has used his Esprima parser to count the most popular keywords in a corpus of JavaScript libraries.

Oracle discusses the features of Java 8, 9, and 10

Quoting “Java won't curl up and die like Cobol, insists Oracle” by Gavin Clarke for The Register:


7 foods experts won’t eat

Great article by Liz Vaccariello for Prevention: “The 7 foods experts won’t eat”. Those foods are:


Stricter equality in JavaScript

Update 2012-11-08: The is operator will not be added to ECMAScript (probably ever). But this article is still relevant, because Object.is() will be part of ECMAScript 6 and because it sheds light on how === works.

Most JavaScript programmers are aware that “normal” equality (==) should be avoided in favor of strict equality (===) [1]. However, every now and then you need something even stricter than ===: If you want to check for NaN or if you want to distinguish between -0 and +0. This blog post explains the details and ECMAScript.next’s [2] solution, the “is” operator.


SpeechJammer – a gun that makes it difficult to talk

You can impede someone’s speech by playing back to them what they are saying with a slight delay. SpeechJammer is a gun-like apparatus that uses this idea to prevent someone from speaking – at a distance.


Displaying numbers in JavaScript

This blog post explains how JavaScript displays numbers. It also examines when JavaScript uses exponential notation and when it uses fixed notation.


“Movie: The Movie” – a funny, star-studded fake trailer

In his after-Oscar special, Jimmy Kimmel presented a fake trailer for the fake film “Movie: The Movie”. (Or is it a real trailer for a fake film? The film clearly doesn’t exist, but the trailer does.) It’s funny and has lots of stars in it.


Apple’s 2012 iPad event: the highlights

Update 2011-03-09: More links under Sect. 2.

This post summarizes what Apple has introduced yesterday.


The jQuery Foundation has been created

jQuery has previously been managed by a board that was part of the Software Freedom Conservancy. Now an independent foundation has been created to perform that task.


Private data for objects in JavaScript

Update 2012-10-21: In September 2012, The term “private name object” has been changed to “private symbol”.

JavaScript does not come with dedicated means for managing private data for an object. This post describes five techniques for working around that limitation:


The month at 2ality: February 2012

To be notified of updates of existing content on 2ality, you have to follow @rauschma on Twitter. Not everyone is willing or able to do that. Therefore, this new monthly column collects that information and makes it available as a blog post. It also reports on current topics that were previously covered on 2ality.