title: How do I write a named arrow function in ES2015?
body: <p>I have a function that I am trying to convert to the new arrow syntax in <strong>ES6</strong>.  It is a named function:</p>
  
  <pre><code>function sayHello(name) {
      console.log(name + ' says hello');
  }
  </code></pre>
  
  <p>Is there a way to give it a name without a var statement:</p>
  
  <pre><code>var sayHello = (name) =&gt; {
      console.log(name + ' says hello');
  }
  </code></pre>
  
  <p>Obviously, I can only use this function after I have defined it.  Something like following:</p>
  
  <pre><code>sayHello = (name) =&gt; {
          console.log(name + ' says hello');
      }
  </code></pre>
  
  <p>Is there a new way to do this in <strong>ES6</strong>?</p>