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.
There are so many proper ways I could respond here, but I’ll save them for a more deserving moment.
Your comment is even worse.
This comment has been reported as abusive
this only works cause uses a named return type. If his variable would be called sum1 it would return nothing.
Maybe its valuable to note that
out := ""
is the same as
var out string
which doesn't need to be initialized as the Zero Value of a String is by default ""
For example?
Depends on the situation and constraints
is fmt.Sprintf a good way to save a value?
Yeah, you're right
"You can assume, for the purpose of this kata, that the supplied array will not be empty"
we have this sentence in description.
what if numbers is empty?
This solution doesn't working with Unicode
Really interesting) I've never seen that we can just return w/out specifying the variable to return
Yes, here are some links with reasoning:
no-param-reassign
(JavaScript/TypesScript)no-ex-assign
(JavaScript/TypesScript)If you need a variable later in the code, it's very easy to just make a copy. The problem is with arrays / pointers, with which there are side effects. But there are no inconvenients with integers AFAIK. Do you have any authorities to back up this?
Loading more items...