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 actually agree with you. It is consider bad practice to use single character variable naming.
Moreover, I do not work as a programmer, but for the third year I have been studying myself from books and videos from YouTube
But this really makes a difference!
Could this explanation have been given from the very beginning instead of criticism?
And then I would thank you for the explanation, and I would not think that you are a troll ))))
:)))))))))))))
;)
Didn't mean to say that it's bad, but look yourself: here was created array, mapped to adjust indexes, and only then mapped to multiply to reduce. It seems overhead for me to iterate 2 times array of required length just to count numbers inside.
I'm upset because people are more likely to vote if they see shorter solution.
export const sumCubes = (n: number): number => Array.from({length: n}, (_,i)=> i+1).reduce((a, b)=> a+b**3, 0)
here is same solution but with properly used reduce and no map, you can take it
So I'm wondering what is a goal to your comment?!
If you want to ask something, then just ask. Ask a Question!
This is my solution. If you do not like it, then offer your own but do not write: " I don't know why... "
What I really don't understand is why do idiots write such comments?
Just because you don't understand "what's going on this" doesn't mean it's the bad solution.
I don't know why it's concidered as a good practice, because I would have no clue what's going on in this ZAMES(mess).
Perfect example of power of ES6
Why people upwote solution as best practice where you have single character variable naming?
You MUST return null | number
Fucjing awesome.
The best.
POSOSI HUY. I bet you from Ukrain.
So bad