title: What does split function look like?
body: <p>I came across this statement :</p>
  
  <pre><code>userName = document.cookie.split("=")[1];
  </code></pre>
  
  <p>after reading about split statement <a href="http://www.w3schools.com/jsref/jsref_split.asp" rel="nofollow">here at w3schools</a>. which says that syntax of split is
  <code>string.split(separator, limit)</code>. Then what does the square bracket after first parens. mean ?
  If this is true what does <code>split</code> function look like ?</p>