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.
1.) You're putting the array in the 'for' loop, which means it will replace the previous
sumArray
(replacement of the variable). Put it outside the 'for' loop.2.) You don't want to break if they are a multiple of 3 and 5. You should just push this number to the array instead.
Hi guys, I'm having a timeout error for this question even though I passed the samples.
I am using a for-loop to evaluate the multiplies of 3 or 5. Is there a more efficient way of solving this question?
Thank you for sharing everyone :)