Skip to content
Advertisement

What does the error mean in my stream map?

Error:

JavaScript

Error image

Code:

JavaScript

Advertisement

Answer

The code block in your lambda expression doesn’t return anything, but the .map() method requires a function / lambda that returns something.

You should write your code as

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement