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

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

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -

jquery - How can I dynamically add a browser tab? -