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 p = {}
p = {}


function p.myFunction(frame)
p.loop = function(frame)
  local args = frame.args
local out = {}
  local text = args[1] or "Hello"
 
  return "The module says: " .. text
for idx = 1, 5 do
table.insert(out, idx)
end
 
return table.concat(out, "<br>")
end
end


return p
return p

Revision as of 22:18, 25 November 2025

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

p = {}

p.loop = function(frame)
	local out = {}

	for idx = 1, 5 do
		table.insert(out, idx)
	end

	return table.concat(out, "<br>")
end

return p