I have recently gotten into javascript (about four days ago), and I'm having troubles acclimating to the syntax a little bit. I'm creating a calender of sorts and I'm trying to get an array of objects (one for each month) to be declared within my "main" object, the calender. I have done copious amounts of googling and browsed all over W3Schools and can't seem to figure it out. So if I have
var calender = {
:
:...functions{},
months: [],
How would I go about getting objects inside of months and declaring their properties (i.e. months[0] would have a name of "January" and its number of days etc)? I am at a conceptual standstill. Do I accomplish this index by index, or can I just literally declare the objects at array creation? From what I grasped so far, it would seem normally I could just say something like var arr = {varName: "name",...(and so on)}, but it seems doing that in the brackets is not allowed, and I'm not sure syntactically where I access the indices. Or maybe I'm just doing this utterly bass ackwards. Any guidance would be greatly appreciated. Thanks