title: Add a property to javascript array element
body: <p>I have to test some code that contains the following comparison: </p>
  
  <p>(I have tried to simplify the original code)</p>
  
  <pre><code>if (app.base.premiums[0].code === ‘1’)
  </code></pre>
  
  <p>and have created a test ‘app’ object</p>
  
  <pre><code>app = {
      base : {
          premiums: ['first']
      }
  }
  </code></pre>
  
  <p>Which I have then tried to add a property to the first element in the array</p>
  
  <p>app.base.premiums[0].code = '1';</p>
  
  <p>But this does not return any value when I type</p>
  
  <pre><code>app.base.premiums[0].code
  </code></pre>
  
  <p>into the browser console.</p>
  
  <p>How should I go about this?</p>