First time Javascript Object alert -
you can see want do, dont know how.
function setupcards() { var cards = { "1name": "value1", "1suit": 1, "1number": 2, "1active": 0 }; alert( cards.1name ); }
try using:
alert(cards['1name']);
because first character of object item begins number.
Comments
Post a Comment