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 don't know who you are, but let there be a divine cure upon you for creating this.
This comment has been deleted.
actually map itself has nothing to do with the repeat - it just passes the element's index to the callback function. the repetition is provided by repeat() getting the index in this specific case.
I guess you learn something new everyday lol, I had no idea you could add an incrementor to map(). I guess it's because map() is an iterative method, there's a couple of examples of an index being used with map() on the mdn, but it isn't explicitly stated anywhere else to my knowledge.
I came up with the same solution but I genuinely tried various approaches before this. I love mathematics because there is always an alternative pattern to recognize and you can tackle problems from various angles. I think I gave this about ~2 hours before I just realized what I need to do but I actually enjoyed this.
I understand everything about this, except for why the "i" actually works as the repeat attribute? Why does this work? I understand everything about it except for that. I looked up various description about how the map function is supposed to work but I just don't get it. I used map before and it always did what I thought it would but in this case I'm just stumped.