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.
Changes from version 1.
Removed friends array as its not needed since I can just itterate over string with spaces just as if it was an array.
Removed variables which is a trade off on readibility vs number of lines.
Note scale should be 5 not 2, forgot to change it..
someone needs to go over answears and delete all the garbage that doesn't use while loop
4 is the first multiple of 2 and 4
12 is also missing ... etc
this is bad solution not sure why would anyone upvote this ....
very nice solution...
you should try using functions such as map, reduce, fold instead of using forEach.
DOESN"T WORK ...
Map call is not needed as factorials can be calculated inside fold .
bad solution ... what if n is 100+? this wont work....
Oh that makes sense .... thank you
How is this 8 kyu????? this is 2 at best....
exactly why this kata is confusing , myself same as Chrono79 order is green > yellow > red > yellow > green ......