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
Unfortunately I don't think this is good advice. It's technically correct, yes, but being able to constrain the type of some variable is the entire point of TypeScript. Our first suggestion here should be to use that capability, not to improve our runtime type checks.
:) You're welcome!
Thanks! You could still use parseInt and parseFloat, or "+" depending on the use case (i.e. parsing strings with non-numerical characters vs. parsing hex values), but I find "+" convenient for working with TypeScript in general.
Here is a helpful table for reference:
https://i.stack.imgur.com/QNMfI.png
*Lol at second glance it appears I accidentally flipped the params in reduce. Should be:
.reduce((acc, n) => acc + n)