Skip to content

Shown Example Is Not Appropriate for arrays--callback-return #1806

@praveeno

Description

@praveeno

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions