are there dictionaries in javascript like python?

前端 未结 7 733
轻奢々
轻奢々 2020-12-07 18:59

i need to make a dictionary in javascript like this

i dont remember the exact notation, but it was something like:

states_dictionary={ CT=[alex,harry         


        
7条回答
  •  無奈伤痛
    2020-12-07 19:17

    Use JavaScript objects. You can access their properties like keys in a dictionary. This is the foundation of JSON. The syntax is similar to Python dictionaries. See: JSON.org

提交回复
热议问题