(() => { let m; let lstM; let lstN; for (let n = 0; n <= 50; n++) { if (!m) { m = n + 5; lstN = n - 1; } if (m <= n) { if (n !== 11 && n !== 12 && n !== 21) { // if (1 == 1) { fnLog([m - n, m, n, n - lstN, "do some thing"]); lstM = m; m = n + n - lstN; lstN = n + n - lstM; } else { fnLog([m - n, m, n, n - lstN, "skip"]); } } else { fnLog([m - n, m, n, n - lstN]); } } // ---------------------------- functionfnLog(n) { if (Object.prototype.toString.call(n) === "[object Array]") { a = n.join(" , "); } // document.getElementById("debug").innerHTML += a + "<br />"; console.log(a); } })();