Reputation: 19315
What is the logic behind the following code?
var next, output = null, thisNode;
It appears like it's some type of coalescing like var foo = bar || baz;
, but I'm not so familiar with the commas.
Upvotes: 1
Views: 300
Reputation: 58301
multiple variable declarations.
its the same as this:
var next;
var output = null;
var thisNode;
Upvotes: 3
Reputation: 589
It's just a shorter way of writing:
var next;
var output = null;
var thisNode;
Upvotes: 7