title: About inserting values into an array
body: <p>I have a question about inserting values into array. I am writing a for loop to insert 1 to 10 integer to an array. The array name is <code>drivelist</code>, and the integer variable is <code>loc</code>.  </p>
  
  <pre><code>drivelist=($drivelist $loc)
  </code></pre>
  
  <p>But the code line is faulty; it just saves the first value and last value.<br>
  However, if I modify the code like this, then it works correctly:</p>
  
  <pre><code>drivelist=( ${drivelist[@]} $loc )
  </code></pre>
  
  <p>Why can the faulty code just save two values?  </p>