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.
The backticks are a template literal (specifically look at tagged templates on MDN for more info on this use) which is being used to call the join function with an empty string as the parameter. This is done so that it joins our reversed array with an empty string / no delimiter instead of the default comma delimiter that join would use if we called it like
a.join()
The TLDR it does the same thing as
a.join("")
, but more concisely and less readablyThanks for letting me know about refactoring, I didn't know that was an option!
I attempted to refactor, but it still (on my screen at least) has me listed under this solution as well, which still shows the version of the code w/out a default argument provided.
This comment is hidden because it contains spoiler information about the solution
Yes, I'm doing that to push each new value into the 'filtered' array. It is doing the same thing as
t.concat([c])
. I suppose it is rather innefficient though. It would probably work better iterating through the input array and pushing eachf(c)
true value into a result array. Thank you for pointing it out.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It isn't actually needed, but I forgot that I could've just declared the variable inside of the function without polluting the global scope.