David Houde
David Houde

Reputation: 4778

javascript multidimensional array help

should this work? Am i missing something?

var this_array = [

    [],

    [
        [],
        [
            [],
            [
                [],
                [
                    ['50.3']
                ],
                [
                    ['12.0']
                ]
            ]
        ]
    ],
    [
        [],
        [
            [],
            [
                [],
                [
                    ['85.3']
                ],
                [
                    ['31.1']
                ]
            ]
        ]
    ]
];

$(document).ready(function () {
    alert(this_array[1][1][1][1][0]);
}

Upvotes: -1

Views: 320

Answers (2)

typeof
typeof

Reputation: 5922

Yes. It works for me:

'50.3'

Did you get an error?

Upvotes: 1

Ben Rowe
Ben Rowe

Reputation: 28711

Works for me: http://jsfiddle.net/Ny8ze/

Are you getting any errors?

Upvotes: 3

Related Questions