DrSchool Learn coding, fast.
EN AR BN CS DE EL Search

Maps / Dictionaries — Example 55

Quick explanation + ready code for: Maps / Dictionaries.

Lua Maps / Dictionaries Back to examples
Back to language
Syntax: Maps / Dictionaries in Lua. ID: #55

Code

const obj = { a:11, b:12 };
console.log(Object.keys(obj), obj.a);

Notes

You can copy this snippet and adapt it. For advanced, add real-world inputs, edge cases, and tests.