use interactive mode
The Interactive mode is a way to get instantly some results as output.
First of all you need to install lua on your machine so i suggest you to follow this simpleguide.
Don't worry is pretty simple to do, once you have installed lua, open up your terminal or console and type the command "lua -i", even "lua" will work the same.
Lua 5.4.0 Copyright (C) 1994-2020 Lua.org, PUC-Rio >
This is what you have to see after the command.
Now you can give it some variable, tables or whaatever you want and do your stuff.
> num = 2 > print(num^2) 4.0 >
Just press "Ctrl" + "c" from the keyboard and the interactive mode will no longer be availabla until you don't call it again.