Hello, I saw a video about fizzbuzz and decided to give it a go in Roblox. Here is my code:
local tests = {
[3] = "Fizz",
[5] = "Buzz"
}
for i = 1, 100, 1 do
local output = ""
for key, expectedOutput in pairs(tests) do
if i%key == 0 then
output = output..tests[key]
end
end
if output == "" then
print(i)
else
print(output)
end
end