title: Is c[num] the same as writing c.num
body: <p>I'm practicig in writing some code. In the solution to the exercise I found this line of code (see below), but I can't figure out what does <code>c[num]</code> represent and  how it works. Is the solution maybe using brackets notation instead of dot notation?</p>
  
  <p>This would mean that <code>c[num]</code> is the same as saying <code>c.num</code>. Or am I on a completely wrong track? </p>
  
  <p>Line of code: </p>
  
  <pre><code>while(num != 1 &amp;&amp; c[num] !== true)
  </code></pre>
  
  <p>Thank you!</p>
  
  <p>PS. Full solution is here: <a href="https://www.w3resource.com/javascript-exercises/javascript-conditional-statements-and-loops-exercise-8.php" rel="nofollow noreferrer">https://www.w3resource.com/javascript-exercises/javascript-conditional-statements-and-loops-exercise-8.php</a></p>