DEV Community

loading...

Discussion on: How to approach solving a challenge during a coding interview

Collapse
teotcd profile image
JedDevs

I also wrote one up in lua, because I have um, no uh, life. 😊

function FizzBuzz()
  for i = 1,100 do
    --print(i)
    if i%3 == 0 and i%5 == 0 then
      print("FizzBuzz")
    elseif i%3 == 0 then
      print("Fizz")
    elseif i%5 == 0 then
      print("Buzz")
    else
      print(i)
    end
  end
end
FizzBuzz()
Collapse
adyngom profile image
Ady Ngom Author

"...because I have um, no uh, life" haha welcome to the club :)

Collapse
theodesp profile image