An arrow function has an implicit return if no braces ({ }) are used. If braces are used and you intended to return an object rather than defined a code block, then you need to wrap the object in parenthesis (({ })).
If you are using an arrow function with map and returning nothing, then you should either use .forEach instead, or add a return value.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
can anyone solve this issue?
Hopefully you've solved it by now, but it is difficult to address your specific issue as your code formatting is broken.
Possible issues:
return
statementAn arrow function has an implicit return if no braces (
{ }
) are used. If braces are used and you intended to return an object rather than defined a code block, then you need to wrap the object in parenthesis (({ })
).If you are using an arrow function with map and returning nothing, then you should either use
.forEach
instead, or add a return value.