title: Toggle values into and out of an array in Javascript
body: <p>I want to have a simple array of values, ie</p>
  
  <pre><code>var simpleArray = ["SE1","SE2","SE3"];
  </code></pre>
  
  <p>I want to check this array when an action happens (a click on a google map layer), that will pass a value to this function and either add the value to the array, or remove it from the array if it already exists.</p>
  
  <p>I am now just a bit confused having seen .splice/push/inArray/indexOf (that doesn't work in IE)/grep (jQuery) - not sure what the best practice is.</p>