DEV Community

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

Collapse
 
jeddevs profile image
Theo • Edited

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

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

Collapse
 
theodesp profile image
Theofanis Despoudis

Lua rocks