let bbb = (function () {
start = function() {
console.log('222');
};
})();
start();
(function() {
let c = 0;
window.test = function() {c++;console.log(c);}
})();
test();
const test = ()=>{};
test();
function init(...params){
/*init vars*/
return ()=>{ /* start code */ }
}
let operation = init(1,2,3,true);
/* ... */
operation(); // exec start code
let bbb = (function () {
start = function() {
console.log('222');
};
})();
start();
function bbb() {
function start() {
console.log('222');
}
return start;
}
const closure = bbb();
closure();