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.
Actually nope, as here there's a remainder operator used, and not the division one.
So, if a number is even, its remainder divided by two is zero, thus it should go to the "else"(after : here) part.
it says in the description, that second array is always shorter
WOW
first
При использовании reduce не нужно писать "+=" так как он сам суммирует и записывает ответ. Можно просто "+"
good way, but
this only works if arr1.length > arr2.length else doesn't work
example:
arr1 = [4, 3, 3, 5], arr2 = [3, 4, 3] ==>> works correctly
arr1 = [4, 3, 3], arr2 = [3, 4, 3, 5] ==>> does not work !
this link might help you understand what does this syntax means
the one and only solution
use === instead of ==
A reduce function which is easy to follow along, thanks :)
Very beautiful, though useless...
I'm sure you learned a thing or 10 with all this edition thing, Sr. 🙂
I agree, mine is way better in terms of readability. ありがとうねえ。
Also you could just
good job
goood boi
Loading more items...