title: Is it wrong to ignore implicit return inside arrow function in JavaScript or TypeScript when no return required
body: <p>Very often I come across code that looks something like this:</p>
  
  <pre><code>ngOnDestroy() {
    this.subscriptions.forEach(subscription =&gt; subscription.unsubscribe());
  }
  </code></pre>
  
  <p>My question is if this is, while harmless in this example, a bad practice since the implication here is that there is a return value which is equal to whatever <code>unsubscribe()</code> method returns.</p>
  
  <p>The code above does not have any need to return anything out of the arrow function, yet there is an implicit return there, i.e., the body is translated into <code>return subscription.unsubscribe()</code>.</p>
  
  <p>Would it be a better practice to code that function as follows? (note the extra curly braces):</p>
  
  <pre><code>ngOnDestroy() {
    this.subscriptions.forEach(subscription =&gt; {
      subscription.unsubscribe();
    });
  }
  </code></pre>