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.
U can use this method as well -
const arrayOfDigits = Array.from(String(num), Number);
here, Array.from() creates a new array from the array-like object, by passing String(num), we convert the number into a string, which splits it into its individual characters
the second parameter, Number, is a callback that converts each character back into a digit, creating an array of digits from the number
i think so yes
reducer can take up to 4 arguments, you can just omit the last two, which are indices and array. So you can use acc and value of the index.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
is this solution considered any good?
This comment is hidden because it contains spoiler information about the solution