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?

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 = [];
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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.