title: Declare array of array in loop typescript
body: <p>On my app I have an object of dates which contains time array like 
  Console log output is as follows</p>
  
  <pre><code>32: {
  1514160000: Array [ 1200, 1500 ],
  1514764800: Array [ 1200, 1500 ],
  1515369600: Array [ 1200, 1500 ],
  1515974400: Array [ 700, 1200, 1500 ],
  1516579200: Array [ 700, 1200, 1500 ],
  }
  </code></pre>
  
  <p>With this data I have implemented loop to create a new array of dates with time and worker id as follows ( similar to this )</p>
  
  <pre><code>1514160000 :[
  1200 : [32,40,56],
  1500 : [32,40],
  ],
  1514764800: [
  1200 : [32,40,56],
  1500 : [32,40],
  ]
  </code></pre>
  
  <p>I have written following code for this where I want to create array of dates by dynamically assign dates and then create it an array again.</p>
  
  <pre><code>let allDates :any = [];
        for(let pid in this.allAvailableProviders)
        {
          console.log(pid);
          for(let slotDate in this.allAvailableProviders[pid]){
            if(!Array.isArray(allDates[slotDate])){
              let allDates[slotDate] :any = [];
            }
          }
        }
  </code></pre>
  
  <p>where allAvailableProviders is object</p>
  
  <p>It gives me following error on ng serve </p>
  
  <pre><code>'=' expected
  </code></pre>
  
  <p>How can I do it ?</p>