Javscript based nested for loop along with Objects : I'm new to javascript. when I was working with objects and nested loop. [plunker][1] is available

    var a = [{b:[{c:null}]}]
    for(var x= 0 ; x<10;x++){
      for(var y= 0 ; y<10;y++){
        console.log(a);
        a[x].b[y].c = y;
        console.log(a);
      }
    }


I was getting error like `TypeError: Cannot set property 'c' of undefined` can some one please explain why it is working like this


  [1]: https://plnkr.co/edit/EodiL1wo6xqNEPK4StcS?p=preview