title: Does the arrow function have to always return a value?
body: <p>Many times when using Eslitn or other linting tools I was getting an error like this:</p>
  
  <pre><code>Err: // Expected to return a value at the end of arrow function 
  </code></pre>
  
  <p>Does arrow functions always have to return a value?
  If the arrow function has to return a value, what's the reason for this? </p>
  
  <p>For example, in this particular piece of code, I don't need to return anything if a condition is not passed. Anyway my linter yiels at me with the mentioned error.</p>
  
  <pre><code>const getCookie = name =&gt; {
    const value = `; ${document.cookie}`;
    const parts = value.split(`; ${name}=`);
    if (parts.length == 2)
      return parts
        .pop()
        .split(';')
        .shift();
  };
  </code></pre>