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.
This comment is hidden because it contains spoiler information about the solution
NICE!!!
The way i like loops this wont occur to me at all
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 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.
Who are these people!?
I know all of these methods, but didn't think of combining them in this fashion! Nice one! :)
Study array methods, itll save you time and make the code cleaner
console.log('damn '.repeat(3));
Clever solution.
How do people realize this is the solution? mine's nested loops with a nasty amount fixes, i have a long way to go
damn * damn * damn repeat
( ͡° ͜ʖ ͡°)
nice solution, adding comment can be more benefital for beginners
Loading more items...