Jump to content

Module:Sandbox

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Rhys420 (talk | contribs) at 03:59, 31 December 2017. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

--ohmoma100
-- [Lua task #3]  Create your own Lua module on English Wikipedia
local p = {}-- p stands for package
p.times = function(frame)
	local num = tonumber( frame.args.num ) or 2
	local out = "Times table<br>"
	for i = 1, 10 do
		out = out .. i * num .. "<br>"
	end
	return out
end

return p
--Rhys420_Google_Code-In, Introduction_To_Lua_in_Wikipedia