Board Thread:Lua Help/@comment-24473195-20140813090251/@comment-11733175-20140813091726

Lets imagine I had the following module: local p = {}

function p.foo return 'foo' end

return p

I can access that function by calling  from the debug console, which will print 'foo'. If you wanted to get in the middle of a function to figure out where it was going wrong but before the return statement, you can use the  method to output something to the console.

If you wanted to test something quickly without making it into a module, you could do something like this (enter it directly into the console): local foo = '   foo     ' =mw.text.trim( foo )

-- this is what is output to the console >> 'foo' I know its not the most intuitive thing to use, but that's the gist of it. Essentially:
 * To make something print a value to the console, it needs to be preceded by =
 * Anything else, e.g. variable assignment, doesn't have an = in front of it