You can't access the object literal in it's definition, you should create a function for that, check this pen
In it I've defined objectLiteral as:
objLiteral = {
numberOne : 50,
numberTwo : 80,
mathStuff : function() {
return this.numberOne + this.numberTwo;
}
};
objLiteral.matchStuff(); //130
That way this
will be the object, otherwise it'll be window
because the object does not exists at that time (and window it's the default scope)
Also, I recommend you search more on this topic, one good (and free) resource is this book