Module:Sandbox/54nd60x/test: Difference between revisions

Content deleted Content added
Undid revision 1004203086 by 54nd60x (talk)
No edit summary
Line 17:
end -- end of the function "hello"
function p.headerpagename(frame) -- Add another function
local name = frame.args[1] -- To access arguments passed to a module, use `frame.args`
-- `frame.args[1]` refers to the first unnamed parameter
-- given to the module
return "<h1>https://en.wikipedia.org/w/index.php?title=" .. name .. ".</h1>&action=foo" -- `..` concatenates strings. This will return a customized
-- greeting depending on the name given, such as "Hello, Fred!"
end