Ya Skyzyx, you got it right. What jkd used is called an object literal. The same way this
Code:
var nums = [1,2,3,4];
is the literal syntax for this
Code:
var nums = new Array(1,2,3,4);
For objects, this
Code:
var nums = { M: 1000, D:500, C:100, L:50, X:10, V:5, I:1 }
is the same as doing this
Code:
var nums = new Object();
nums.M = 1000;
nums.D = 500;
nums.C = 100;
nums.L = 50;
nums.X = 10;
nums.V = 5;
nums.I = 1;
Since functions are just another variable type in javascript, jkd is just assigning functions to his CookieJar object's properties to make them methods.
About the parameter passing thing with anon function...that's not really an anonymous function, it's name is
fill and you can't pass parameters like that.
Hope I've helped