For clairifying you can add a string to a variable then add other variables as such;
var one = "test", super,apple,pear,cardboard
The string "test" will be assigned to the variable one as well; super, apple, pear, cardboard will also be created variables ?

Recommended Answers

All 3 Replies

Member Avatar

The variables will be created, but will be undefined. See Chrome watched variables on breakpoint:


Member Avatar

Personally, I declare variables individually each on their own line - clarity over brevity. You can always minimize and gzip the production version anyhow.

diafol - When you say undefined you mean you must define them later, gotcha :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.