Blogger Information
Blog 81
fans 1
comment 0
visits 124592
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
js中的关联数组
有什么是忘不了的的博客
Original
962 people have browsed it

在js 中创建 数组 用var arr = [1,2,3,4] 或者 var arr = new Array(1,2,3,4)

但是当我去创建关联数组的时候我就需要用 类的方式来创建 var arr = {'a':1,'b';2} 感觉很怪,在php中可以直接用['a'=>1]这样的方式创建。后来我通过typeof来查看js 数组的时候发现返回的object说明js中的数组就是个类。

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post