What does variable declaration with multiple comma separated values mean (e.g. var a = b,c,d;)

When I try to understand plugin codes, I often find these kind of declarations but I don't know exactly what it means.

var a = b,c,d;



This is a syntactic shorthand, and identical to:

var a = b;
var c;
var d;

The first one (a) gets initialized with the value of b, but c and d are uninitialized.


It will define var a = b and then define var c and d


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.