Module:Learn Lua: Difference between revisions

From Livermore History Collaborative
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
local foo = "bar"
local p = {}
print (foo)
 
function p.myFunction(frame)
  local args = frame.args
  local text = args[1] or "Hello"
  return "The module says: " .. text
end
 
return p

Revision as of 22:05, 25 November 2025

Documentation for this module may be created at Module:Learn Lua/doc

local p = {}

function p.myFunction(frame)
  local args = frame.args
  local text = args[1] or "Hello"
  return "The module says: " .. text
end

return p