问答详情
源自:4-10 编程练习

定义多维数组

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

提问者:小张刘 2015-03-30 17:18

个回答

  • 康振宁
    2015-03-31 11:27:21
    已采纳

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

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

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