javascript
javascript copied to clipboard
Shown Example Is Not Appropriate for arrays--callback-return
4.6 in Readme last example is shown as
inbox.filter((msg) => {
const { subject, author } = msg;
if (subject === 'Mockingbird') {
return author === 'Harper Lee';
}
return false;
});
but its not a example of arrays--callback-return
, its illustrate avoid of else
, when using return statement.
I agree that the difference between the last two examples is about no-else-return, not just array-callback-return.
What would you suggest?
I just made a pull request regarding this issue sir. Please have a look at it.