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
Fun
Why?
Who uses eval to do a simple multiplication? Or was that a troll solution?
Now i feel embarrassed From how long it took me to solve it 🙂🙂😢
exactly
haha same here
same!
I feel dumb now lol
Ah, yes. I forgot about 'product = 1' xD
Haha I like that
This comment is hidden because it contains spoiler information about the solution
rparks52 is right (assuming "p = 1" is "product = 1".)
This process is called initialization; where a variable is assigned for later parts of the code to use.
for example : arr = [1, 2, 3, 4, 5]
Following this process, regardless of what integers/floats are in the array, they will definitely multiply each other.
instead of product = 1 => product = arr.pop(0)
Making the iteration one less :D
Same but damn did this kata make me feel dumb for how long I was thinking haha
Loading more items...