JavaScript, Object Oriented, Technology, Oop.
the private `count` variable // defined anywhere in their scope chain (containing function // scopes). click: () => count += 1, getCount: () => count.toLocaleString() }); }; const counter = createCounter(); counter.click(); counter.click(); counter.click(); console.log( counter.getCount() ); A