How to check map/dictionary/table/associative array existence in Lua?

后端 未结 0 1731
清酒与你
清酒与你 2020-12-05 02:02

In other programming language sometimes as easy as this:

// go
v, ok := theMap[k]
// js
theObj.hasOwnProperty(k)
// ruby 
theHash.has_key? k

相关标签:
回答
  • 消灭零回复
提交回复
热议问题