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.
Thanks for that explanation :) I didn't think of using split and join in that way.
Not an issue
It's just like what @Unihedron said - and while reduce isn't the hardest thing to use, often times it's easy to forget that you can initialize the start value as anything (including an empty object) - the goal of the problem was to return a single object with the correct counts - reduce helps us accomplish that!
This comment is hidden because it contains spoiler information about the solution
Yes the split function will change, for example,
"GCAT"
into["GCA",""]
. The join then adds a"U"
between all of the strings in the array so you get"GCA" + "U" + ""
->"GCAU"
.This one is short and sweet! Is it safe to say that "T" is being split off the string and then .join is being used to throw a "U" back in its place?
I like the way you did yours, I didn't realize I was allowed to change x and y to something else. Also, what does the 'use strict' bit mean?