User:Rafidaslam/sandbox

From Wikipedia, the free encyclopedia

Heya! welcome to my sandbox, though there's no any sand here :/

Name of a table variable that stores the filenames is imgs defined as a local variable inside the RexxS.carousel() function, the filename that returned from RexxS.carousel() is randomized by using time.

Lua task 3[edit]

Which letter is conventionally used in Scribunto modules to hold the table of functions? => p, since it stands for "package"

What keyword marks the start of a function definition? => function

What keyword marks the end of a function definition? => end

{{#invoke:Sandbox/Rafidaslam|hello}}

=> Hello, world!

I need to write:

{{#invoke:Sandbox/Rafidaslam|hello}}

in a mediawiki page (with Scribunto enabled) to call the hello function from my sandbox module.Sandbox/Rafidaslam is my module page name.

Lua task 4[edit]

Hello from Lua to my friend Rafid.
Hello from Lua to my friend Jimbo.

Function Hi() has a frame parameter that will be appended to the string "Hello from Lua to my friend ".

If we call Hi('Rafid') it will returns "Hello from Lua to my friend Rafid" If we call Hi('Aslam') it will returns "Hello from Lua to my friend Aslam"

And also there's a default parameter when the function is called without any parameter, that default parameter is "Jimbo" (for name parameter), so Hi() -> "Hello from Lua to my friend Jimbo".

{{{2}}}