javascript - self executing anonymous functions + Comma seperated statements -


can explain following code piece. aware type of function calling anonymous functions. not sure how comma separated statements work inside it, in loop. please point out related articles if any.

(function (p1, p2) {     = "", b = "", c = "";     x = p2();     y = p1("aaabbbcc");      f1 = function() {         return y.shift()     }, d = "", e = "", f = "", h = !0, g = f1();     (i = 0; y.length && h; i++)         a.length != 12 && (a += g, g = f1()), b.length != 11 && (b += g, g = f1()) })(1, 2) 

the above example, of may invalid.

-cmo

i think you're asking comma operator. mdn here: https://developer.mozilla.org/en-us/docs/javascript/reference/operators/comma_operator

briefly, 2 expressions can combined using it. includes assignments.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -