DEV Community

loading...

Discussion on: JavaScript Array.flatMap()

Collapse
ncpa0cpl profile image
ncpa0cpl

In example where you want to remove all negative numbers you should have number < 0 instead of number < 1. 0 is not a negative number but it would get removed.

Collapse
samanthaming profile image
Samantha Ming Author

ahhhh 😱 great catch...let me fix it now! thanks for letting me know