title: JavaScript: Check length of URL parameter values
body: <p>I've this URL here:</p>
  
  <pre><code>http://localhost.com/?color=Red,Blue,Green
  </code></pre>
  
  <p>How can I check now with JavaScript how many values are set to the parameter separated by the comma?</p>
  
  <p>So something like:</p>
  
  <pre><code>if (url.parameter.length &gt; 1) {
      alert('More then 1 parameters');
  } else {
      alert('Just one');
  }
  </code></pre>