title: Pass array in HTML method parameters javascript
body: <p>I know this is an easy one, but I can't find exactly what I am looking for. I was wondering if it is possible to pass an array into a method as a parameter, but through HTML. If it is possible I think it would be something like this:</p>
  
  <pre><code>&lt;img src="img.png" alt="picture" onclick="thisMethod1(['Facebook','Twitter'])"/&gt;
  </code></pre>
  
  <p>The javascript would look something like this:</p>
  
  <pre><code>function thisMethod1(socialArray)
  {
       //use this array
  }
  </code></pre>
  
  <p>Is this correct?<br>
  <strong>The reason I am asking is because there is an error in my code and I am trying to find it.</strong></p>