This Week in JavaScript - 02 June 2014

Welcome to your weekly update of JavaScript news and goodies.

There’s been so much going on this week, that this post is almost writing itself. Enjoy!

Top of the hour

Dart 1.4 Brings Deep Visibility to Run Applications - it’s much easier to improve something if you can measure it
xss-game - teaches you how to find and exploit XSS bugs
Googlebot’s recent improvements might revolutionize web development
Git 2.0 released - features better defaults and kinder learning curve
Top 10 JavaScript traps for a C# developer


Understanding asm.js
Tail Calls, Optimization, and ES6
An Introduction To Node.js And MongoDB
Sharing Polymer Components: Part 1
The Curious Case of JavaScript NaN
Explain this JavaScript name clash - from Stack Overflow


24 Talk Videos from EmpireJS - featuring John Resig, Tom Dale and many more
Jeremy Ashkenas - JS.Next and CoffeeScript - from FutureJS 2014
What’s an Object in JavaScript?
Understanding the four layers of JavaScript OOP
Beginners GIT: Or If I Could Turn Back Time… - because we all use version control, right?


Numeral.js - A javascript library for formatting and manipulating numbers.
App.js -a lightweight JavaScript UI library for creating mobile webapps
Skippr - A lighter, faster slideshow plugin for jQuery.
Headroom.js - Give your pages some headroom. Hide your header until you need it.
Latest Jquery goodies and online tools

So what are your thoughts on the latest going-ons in the world of JavaScript? Are you using version control in your projects? Have you wrapped your head around TCO?

Please PM us if you have anything of interest for the next issue, and happy reading! - Paul & [URL=“”]Pullo

I’m not sold on Dart, it seems to exist for people who dislike JavaScript itself and I’ve heard of cases where the compiled js is huge - this will happen when the language is working against the grain of the compilation target.
CoffeeScript on the other hand is written by people who love JavaScript but have taken the liberty to clean up some of the nastiest parts of the language. They’ve improved and simplified the syntax without changing the fundamental concepts of JavaScript.

Yeah, I use git for everything now.

What’s TCO?

Tail Calls, Optimization, and ES6 ??

The new Discourse site will be ES6 so I best take a look at that!

Yeah, I heard that, too, although I think performance has improved since “Hello World” in Dart compiled to 17,259 lines of JavaScript code.
I had a quick search and found quite an interesting discussion of why Dart produces so much boilerplate:!topic/misc/8pF9-56hWJk
I don’t use Dart myself, but have been watching it quite closely since reading that it had been designed as a replacement for client-side JavaScript.

Tail Call Optimization: where you are able to avoid allocating a new stack frame for a function because the calling function will simply return the value that it gets from the called function.
There’s a good explanation of it here:

AFAIK, to achieve something similar you had to use trampolines in JS until now.
However (as the article says) ES6 will bring us “proper tail calls”
Here’s another good explanation: