Back with another LUA question:
I am interested if LUA inherently supports checking a value against ANY value in a table. Let me explain.
Let us say we have a table with some values:
Lua Code:
local myTable = {
"Value1",
"Value2",
"Value3"
}
Is there any way I can check some variable against the whole table as in:
Lua Code:
if some variable == ANY value in myTable then code here end
I am curious because using a
Lua Code:
for k, v in pairs(myTable)
loop seems a bit bulky just to decide if the variable matches any value in said table.
Thank you for your time and assistance!