为了账号安全,请及时绑定邮箱和手机立即绑定

定义多维数组

我只想知道那个数组如何定义哦~这是四维的?难道是这样?也太麻烦了~ var myarr=[["小A","小B","小C","小D","小E","小F","小G","小H","小I","小J"],["女","男","男","女","女","男","女","女","女","男"],[21,23,24,21,22,21,22,20,20,20],["大一","大三","大四","大一","大四","大一","大二","大三","大一","大三",]]

正在回答

1 回答

这是二维的,不是四维的。

你这样定义的话,你怎么茶到每个人所对应的信息呢 ?这样挺麻烦的,你可以这样

 var myarr=[["小A","女",21,"大一"],["小B","男",23,"大三"]]

0 回复 有任何疑惑可以回复我~
#1

小张刘 提问者

非常感谢!我明白了!
2015-03-31 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
JavaScript进阶篇
  • 参与学习       468188    人
  • 解答问题       21891    个

本课程从如何插入JS代码开始,带您进入网页动态交互世界

进入课程

定义多维数组

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信