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 code defines a Lua module named
"solution" that contains a function
named "find_multiples". The
"find_multiples" function takes two
parameters: "integer" and "limit". It
returns a table (array) containing
all the multiples of the "integer"
parameter up to the "limit" parameter. Inside the function, a local
variable named "multiples" is
initialized as an empty table. Then,
a for loop is used to iterate from
the "integer" value up to the "limit"
value, incrementing by the "integer"
value each time. Within each
iteration, the current value of "i"
is inserted into the "multiples"
table using the "table.insert"
function. Finally, the "multiples"
table is returned as the result of
the function. The module "solution"
is then returned, making the
"find_multiples" function accessible
to other parts of the program that
import this module.
Biased response but this looks better to me because it's more readable
This comment is hidden because it contains spoiler information about the solution