Q: In JS, what is this feature called? I'm trying to learn about this feature of javascript I keep seeing in code, but I don't know the name of the construction to google for...
var Stats = {
  onLoad: function(e) {
    // content
    this.variable++;
  },

  variable: 1
};

Is this way of organising functions and variables based on JSON?

A: It's an "Object Literal" - see the JavaScript Guide.

A: It's called the Object Literal syntax.
It's a superset of JSON.

A: The sample code creates an object literal (i.e. a hash map), with two entries. The first entry maps "onLoad" to an anonymous function, and the second entry maps "variable" to 1.

A: Thanks guys, I gave the answer to Richie for being first, but the link Greg gave has more examples, so I'll use both to learn of course (and others from google).
@Barry: thanks for explaining what it does, but that was not really what I was aiming at with the question :)
