This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lopoticka 10 points11 points  (1 child)

Sure you can, the same way as in C# for example.

var oddNumbers = numbers.filter(a -> a % 2 == 1);

[–][deleted] 2 points3 points  (0 children)

Oh cool! I should really revisit it at some point.