title: Array in Bash Not Found
body: <p>I am trying to declare an array in bash, but when the code is run it says it cannot find the array. I have tried to write out the declaration of the array in several different ways, but it seems no matter how I try to declare it I cannot get it to work. I originally tried to declare it as such:</p>
  
  <pre><code>candidate[1]= 0
  candidate[2]= 0
  candidate[3]= 0
  </code></pre>
  
  <p>The error messages that are returned are:</p>
  
  <pre><code>votecalculation.sh: 13: candidate[1]=: not found
  votecalculation.sh: 14: candidate[2]=: not found
  votecalculation.sh: 15: candidate[3]=: not found
  </code></pre>
  
  <p>After this I tried another solution I found online:</p>
  
  <pre><code>ARRAY=( 'can1' 'can2' 'can3' )
  </code></pre>
  
  <p>When that is used it returns this error:</p>
  
  <pre><code>votecalculation.sh: 12: Syntax error: "(" unexpected
  </code></pre>
  
  <p>I am new to Bash and am getting really confused about arrays. Is there some specific way I need to declare an array or am I just going about it completely wrong?</p>