title: How do I use dot notation in order to create memory cups to store values?
body: <p>I want to store the audio elements and audio array names in each index of audiochannel, the array, that is created. I remember my teacher using this method of creating memory cups with a &quot;.&quot;. Like temp.xSpd. How do I create memory cups, or I think its also object fields, to properly store the data?</p>
  <pre><code>var audioArray=[];
  var audiochannels=[];
  var audioArrayNames=[&quot;ring&quot;,&quot;splat&quot;];
  
  for(var i=0;i&lt;2;i++){
      audioArray[i]=document.getElementById(&quot;audio&quot;+i);
  }
  
  for(var a=0;a&lt;2;a++){
      audiochannels[a] = {};
      audiochannels[a].channel = new Audio();
      audiochannels[a].channel.name=audioArrayNames[a];
      audiochannel[a].channel.src=audioArray[a];
          
      console.log(audiochannels[a].channel.name);
      console.log(audiochannels[a].channel.src);
  }
  </code></pre>
  <pre><code>&lt;audio id='audio0' src='ring.wav' preload='auto'&gt;&lt;/audio&gt;
  &lt;audio id='audio1' src='splat.wav' preload='auto'&gt;&lt;/audio&gt;
  </code></pre>