Jump to content

Module:User:Doc Taxon/Hello

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Johnuniq (talk | contribs) at 02:18, 13 October 2015 (per WP:Lua/Requests#Loops and Lua: 'for' is much better). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
local p = {} 
function p.hello(frame)
    local name = frame.args[1]
    if not name then 
        name = 'World' 
    end
    local u = ""
    for i = 1, 5 do
    	u = u .. '\n\n' .. i .. ': Hello ' .. name .. '! This is Lua!' 
	end
    return u
end 
return p