0

I would like to define the following in Javascript:

var tileXml = new Array();
var tileTextAttribute = new Array();
var tileImageAttribute = new Array();
var tileNotification = new Array();

As:

 var tileXml,tileTextAttribute,tileImageAttribute,tileNotification = new Array();

I should be right. For some reason it fails in the second case, why?

asked Jun 28, 2012 at 9:04
1
  • No, only tileNotification will be an array, the other ones will be undefined variables. Commented Jun 28, 2012 at 9:08

1 Answer 1

1

No you cannot do that, instead to this

var tileXml = [],tileTextAttribute = [],tileImageAttribute = [],tileNotification = [];
answered Jun 28, 2012 at 9:09
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.