Functions

Jul 1, 2023  │  m. Jul 2, 2023 by Gleb Buzin
function calculateTax(price)
    return price * 0.21
end

local result = calculateTax(100)
print(result)
21.0

function info(name, age, country)
  print(name .. " is " .. age .. " years old.")
end

info("Kenneth", 12, "Jupiter")
Kenneth is 12 years old.


Next: Variadic Functions