2ality - 2ality.com - ②ality – JavaScript and more
General Information:
Latest News:
Protecting objects in JavaScript 25 Aug 2013 | 04:58 am
This blog post is a quick refresher of how objects can be protected in JavaScript. There are three levels of protection: Preventing extensions is the weakest level, sealing is stronger, freezing is...
Why all objects are truthy in JavaScript 21 Aug 2013 | 12:40 am
In JavaScript, all objects are truthy [1], even new Boolean(false), empty arrays and empty objects: That is different from how objects are converted to number and string, where you can control the re...
Callable entities in ECMAScript 6 11 Aug 2013 | 07:29 pm
In ECMAScript 5, one creates all callable entities via functions. ECMAScript 6 has more constructs for doing so. This blog post describes them. The status quo: ECMAScript 5 In ECMAScript 5, function...
The flag /g of JavaScript’s regular expressions 9 Aug 2013 | 01:47 am
This blog post describes when and how to use regular expressions whose flag /g is set and what can go wrong. (If you want to read a more general introduction to regular expressions, consult [1].) Th...
Directories for JavaScript resources 4 Aug 2013 | 12:04 pm
I recently asked on Twitter whether people knew any good directories for JavaScript libraries and got several good answers. I was only aware of the following two directories: “JSDB: a collection of ...
A meta style guide for JavaScript 30 Jul 2013 | 04:15 pm
JavaScript has many great style guides. Thus, there is no need to write yet another one. Instead, this blog post describes commonly accepted meta style rules and conventions that I like that are contr...
ECMAScript 6 modules: the future is now 27 Jul 2013 | 06:38 pm
This blog post first explains how modules work in ECMAScript 6, the next version of JavaScript. It then describes tools that allow you to already use them now. Module systems for current JavaScript ...
In defense of JavaScript’s constructors 22 Jul 2013 | 09:07 pm
JavaScript’s constructors have never been particularly popular: Douglas Crockford doesn’t like them and recently, more anti-constructor material has been published (two examples: blog posts by Kyle Si...
Hello Polymer: Q&A with Google’s Polymer team 17 Jul 2013 | 02:19 am
Today, there was an online event called “Hello Polymer” in which Polymer team members Eric Bidelman, Alex Komoroske and Matthew McNulty talked about the framework. This blog post summarizes what happe...
Trailing commas in object literals and array literals 15 Jul 2013 | 02:45 am
Quick reminder: trailing commas in object literals are legal in ECMAScript 5, trailing commas in arrays are ignored. Trailing commas in object literals Thus, if you can afford to ignore older JavaSc...