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
wtf
Wikipedia and MDN call them "loops".
Yeah you're right, I must have overlooked that. I think I might have just reused the methods I wrote for the other kata in this series, without really paying attention to what each one returned.
Yeah it's probably not so good -- I think it was giving me trouble and I just went with the first way I could think of that worked.
I don't think I knew that there was a math way when I wrote this, haha. Using a
loop
was probably the most performant way I could think of at the time.I just did this again in JavaScript, using the same formula as your solution this time, and thought it was pretty good -- then I looked at the other solutions and saw that there's an even better way.
Thanks for the comment! I think these new ways will come in handy again.
This comment is hidden because it contains spoiler information about the solution
That's a good question -- I haven't learned much about security yet so I'm not sure.
This comment is hidden because it contains spoiler information about the solution
That's a cool trick using
call
to determine if something is a function!The Description says, "There will always be a missing element and its length will be always between the given arrays", so if I am understanding it correctly, I don't think that case is part of the requirements.
Approved.
(This is my first time approving a kata, so please let me know if I did anything incorrectly. Thanks!)
I just updated the description with a note explaining this at the end, so it should make more sense now.
This comment is hidden because it contains spoiler information about the solution
thanks!
Loading more items...