title: arrow function with promise
body: <p>I'm relatively new to <strong>AJAX</strong> and I don't understand how do <strong>arrow function</strong> works with <strong>promise</strong><br />
  well the syntax I'm familiar with the following:</p>
  <pre class="lang-js prettyprint-override"><code>functionThatReturnsAPromise()
    .then(function(data) {
      // Do somthing with data 
    })
    .catch(function(err) {
      // Do something with error
    });
  </code></pre>
  <p>but I have come accross this code which based on an arrow function, I really don't understand it:</p>
  <pre class="lang-js prettyprint-override"><code>getActivityInformations(event) {
    return this.service.getEntityRep(a).then(list =&gt; {
      const myList = list ? list.length : 0;
      // some code
    });
  }
  </code></pre>