Referencing a javascript object literal array

后端 未结 5 1865
旧时难觅i
旧时难觅i 2021-02-08 22:57

How would you reference the models (Accord, CRV, Prius, etc) in this structure? Is this a bad structure to be able to extract the makes...then use a make to get the models...th

5条回答
  •  粉色の甜心
    2021-02-08 23:44

    If I were you, I wouldn't lump all your data into one big multidimensional array/object literal mess like that. I'd encapsulate each object and use methods to access the data. It'll mess with your brain a lot less.

提交回复
热议问题