All decent suggestions. I quibble with this, though:
// Don't do this:
function getData() { }
// Do this instead:
var getData = function() { };
The assignment is righteous, but by omitting the function’s name, you make stack traces more difficult to follow. Better this instead: var getData = function getData() { };