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.
Beautiful. I couldn't figure out if these were supposed to somehow indicate coordinates but this clarifies my confusion I think
That really helped me, Thanks!
The numbers determine which numbers in the array returned have been replaced by the words, based on divisibility. If no arguments are given, the defaults are equivalent to
fizz_buzz_custom('Fizz', 'Buzz', 3, 5)
.In the examples given,
fizz_buzz_custom[44]
returns "FizzBuzz" because the 45th element of an array of numbers from 1 to 100 is 45, and 45 is divisible by both of the default numbers (3 and 5).If we pass in different arguments, for example
fizz_buzz_custom("What's ", "up?", 3, 7)[2]
, this should return the 3rd element in the array of 1 to 100, where numbers in that array which are divisible by 3 have been replaced by "What's ", numbers in that array which are divisible by 7 are replaced by "up?", and numbers which are divisible by both are replaced with "What's up?". Since the 3rd element in an array of 1 through 100 is 3, which is divisible by 3 (the 3rd argument), this will return"What's "
.Does that help to clarify?
Super confused about what the two number parameters are supposed to do exactly. Can somebody please clarify what we're supposed to do with them? Thanks!