1<script type="text/javascript">
2var myObj = {
3 fred: { apples: 2, oranges: 4, bananas: 7, melons: 0 },
4 mary: { apples: 0, oranges: 10, bananas: 0, melons: 0 },
5 sarah: { apples: 0, oranges: 0, bananas: 0, melons: 5 }
6}
7
8document.write( myObject[ 'fred' ][ 'apples' ] );
1var iMax = 20;
2var jMax = 10;
3var f = new Array();
4
5for (i=0;i<iMax;i++) {
6 f[i]=new Array();
7 for (j=0;j<jMax;j++) {
8 f[i][j]=0;
9 }
10}
11