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.
Could you explain your awnser?
Arrays seem a lot faster.
http://jsperf.com/bibodha-vs-codehunger
Thanks.
For the performance: jsperf
It seems to be faster Math.max, on Chrome and Firefox.
young, stupid, and not thinking this kata through :(
Hmmm, you're right.
The test cases should probably pick up on that.
What happend whel the random value is 0.99?
Do you get the 5thd 'undefined' value from the array?
Why do you use a object instead of an array?
You have a lot of number conversions in your code
random = float
floor = int
objectKey = String
Magic numbers for luck!
Why is colorArray a global?
You could use Math.max to calculate the length. I'm not sure which is faster tho.