Push an associative item into an array in JavaScript

前端 未结 4 716
死守一世寂寞
死守一世寂寞 2020-12-13 08:26

How can I correct the following code?

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-13 09:01

    JavaScript has associative arrays.

    Here is a working snippet.

    They are simply called objects.

提交回复
热议问题