Thanks for the reply!
So I'm starting to understand but I'm not quite there yet it seems.
In the first file that's loaded (init.lua), I put this at the top
Lua Code:
local AddOnName, AddOnTable = "My AddOn", {};
AddOnTable.myVar = "TESTING"
In my second file that's loaded (core.lua), I put
Lua Code:
local AddOnName, AddOnTable = ...;
print(AddOnName); -- Correctly printed addon name
print(AddOnTable.myVar); -- Printed nil :(