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
Doubt!! Consider the number 89.
for "8" the initial value added is 0, as initial value is specified in reduce method.
So for "9" , the accumulator(8) will be added to 9.
Is 0 used as initial value for all indexes in array?
Great explanation PixelLemons! :)
I like the soloution with the extra + to convert it
very clear!
very clear!
This comment is hidden because it contains spoiler information about the solution
The "i" means case-Insensitive
Create anonymous function with parameter named 'x' like function(x) { return ... }
Where ... is expression after '=>' =)
Same as:
howManySmaller =function(arr,n) {return arr.map(function(x){return x.toFixed(2)}).filter(function(x){return x<n} ).length}
This comment is hidden because it contains spoiler information about the solution
after "n % 2" is evaluated and used in condition, n is decremented by 1 (n = n - 1).
"--" and "++" are decrement and increment operators.
"x--" means use first then decrement by 1, "++x" means increment by 1 first then use.