What does "=>" mean in JavaScript?
<p>Here is the code: </p>

<pre><code>function accum(s) {
  return s.split('').map((x,index) =&gt; x.toUpperCase()+Array(index+1).join(x.toLowerCase())).join('-');
}
</code></pre>

<p>I would like to know what "=>" is.  This function takes a string and for the index number of each element it adds that many elements to the output. Here's an example: </p>

<pre><code>accum("abcd") --&gt; "A-Bb-Ccc-Dddd"
accum("RqaEzty") --&gt; "R-Qq-Aaa-Eeee-Zzzzz-Tttttt-Yyyyyyy"
accum("cwAt") --&gt; "C-Ww-Aaa-Tttt"
</code></pre>