How can I create a two dimensional array in JavaScript?

I have been reading online and some places say it isn’t possible, some say it is and then give an example and others refute the example, etc.

  1. How do I declare a 2 dimensional array in JavaScript? (assuming it’s possible)

  2. How would I access its members? (myArray[0][1] or myArray[0,1]?)

96 thoughts on “How can I create a two dimensional array in JavaScript?”

  1. Hmm it looks like your site ate my first comment (it was extremely long) so I guess I’ll just sum it
    up what I had written and say, I’m thoroughly enjoying your blog.
    I as well am an aspiring blog blogger but I’m still new to the whole thing.

    Do you have any helpful hints for novice blog writers?
    I’d certainly appreciate it.

    Reply
  2. Hey There. I discovered your weblog using msn. That is a really neatly written article.

    I’ll make sure to bookmark it and return to learn extra
    of your useful information. Thank you for the
    post. I will definitely return.

    Reply
  3. After looking into a handful of the articles on your
    blog, I truly appreciate your way of writing a blog.
    I bookmarked it to my bookmark webpage list and will
    be checking back in the near future. Please visit
    my web site as well and tell me how you feel.

    Reply
  4. Wow! This blog looks exactly like my old one! It’s on a entirely different subject but it has pretty much the same
    layout and design. Wonderful choice of colors!

    Reply
  5. Hi! Do you know if they make any plugins to assist with Search Engine Optimization? I’m trying to get my
    blog to rank for some targeted keywords but I’m not
    seeing very good results. If you know of any please share.
    Thank you!

    Reply
  6. Your style is so unique in comparison to other folks I
    have read stuff from. Many thanks for posting when you’ve got the opportunity, Guess I will
    just book mark this web site.

    Reply
  7. Pingback: gay slave dating
  8. you’re in reality a just right webmaster.
    The web site loading velocity is incredible. It sort
    of feels that you are doing any unique trick. Also, The contents are masterpiece.
    you’ve done a magnificent task in this matter!

    Reply

Leave a Comment