1. 程式人生 > >javascript二維陣列的訪問 二

javascript二維陣列的訪問 二



var x = 0;
x = 1;


var book = {
 topic :"javascript",
 fat : "true"
}


var primes = [2,3,5,7];


var points = [
{x:0,y:0},
{x:1,y:1}
];


var data = {
 trial1 :[[1,2],[3,4]],
 trial2 :[[2,3],[4,5]]
}
function mm()
{
    alert("you have finished");
   // document.write(book.topic);
   // document.write(book[fat]);
   // document.write(primes[primes.length-1]);
   // document.write(points[1].x) ;
   document.write(data.trial1[1][1]);
}