Can anyone please explain this?
# getting-started
m
Can anyone please explain this?
e
if you want
numList
to contain only even numbers you can type
numList.filter{ it % 2 == 0 }
or
numList.filter{ num -> num % 2 == 0 }
it
is just a shortcut
m
ohh..I got it..thank you