1// four variables are created and assigned in a single go,
2// separated by commas
3var myObj = new Object(),
4 str = 'myString',
5 rand = Math.random(),
6 obj = new Object();
7
8myObj.type = 'Dot syntax';
9myObj['date created'] = 'String with space';
10myObj[str] = 'String value';
11myObj[rand] = 'Random Number';
12myObj[obj] = 'Object';
13myObj[''] = 'Even an empty string';
14
15console.log(myObj);
16