Lua is an Extension programming Language. It is a lightweight multi-paradigm programming language designed as a scripting language. It was released in 1993 and can be used in any operating system. It is very simple language. It is a powerful, fast, lightweight, embedded scripting language. It combines simple procedural syntax with powerful data description.
Given example will find the factorial of a number.
function factorial(n) local x = 1 for i = 2,n do x = x * i end return x end