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.
I used toString() too, but realized I didn't have to. Thanks
Yes, here are some links with reasoning:
no-param-reassign
(JavaScript/TypesScript)no-ex-assign
(JavaScript/TypesScript)Makes sense. Thanks!
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?
There is no point in using new String() here. I think you can just leave it away.
I'm not used to Go so much, but in other languages I use it's considered bad practice to change the given parameter variable, because you usually expect the given value later in the method, not a manipulated value. I mean for such a short method it's not a problem, but for bigger ones it is. Is that different with Go?
There is a lot of duplicated code in that. The last 2 lines in the if and else block are identical, so you can just write them once after the else block closes.
This comment is hidden because it contains spoiler information about the solution
Simple and nice π
Good spot man, clearly wasn't thinking straight when refactoring.
What about caracters like Γ€ Γ Γ³ Γ γ― π ά β§ β β ?
There are 137.374 different caracters that can appear in that String. It's hard to put all into an String to check if it is a different character. Instead you can check if the given character is a number.
Why assigning the result to the number variable as it is not read afterwards?
Thanks duco,
Made the change to your suggested compression.
how to use dat preloaded words? i dont understand
Oops :-( Fixed. Thanks for reporting...
Loading more items...