Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Lua
Lua How to check what index belongs to value
Marina Yegorova
Programming language:
Lua
2021-03-07 14:41:36
0
Q:
Lua How to check what index belongs to value
Ant P
Code:
Lua
2021-08-27 09:35:09
local
index
={}
for
k,v
in
pairs(
values
)
do
index
[v]=k
end
return
index
["a"]
0
Tags
value
check
how
index
Related
if statement example in lua
lua if else
lua not equal
lua for each in table
length of table lua
lua variable types
Lua how to get the index of a nested table
lua difference between pairs and ipairs
what is a value lua
lua value
lua get next value in table
how to get the length of a table in lua
for i in pairs lua
lua syntax
lua in pairs
how to check if file exists lua
New to Communities?
Join the community