If I have a list of items like this:
local items = { \"apple\", \"orange\", \"pear\", \"banana\" }
how do I check if \"orange\" is in this
you can use this solution:
items = { 'a', 'b' } for k,v in pairs(items) do if v == 'a' then --do something else --do something end end
or
items = {'a', 'b'} for k,v in pairs(items) do while v do if v == 'a' then return found else break end end end return nothing