Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Technically there is no difference. The compiler will change this version to a "return" statement.
So it is just syntactic sugar and personal preference.
I personally like to use the lambda style if my method does not have much logic like in this case. This reduces your code to the important statement without the noise of the brackets, etc.
Is it better to write it like this or to write it with "return" ? I don't understand when we should use which
This comment is hidden because it contains spoiler information about the solution