Sobes.tech
Junior — Senior

What will be printed to the console when executing code №102

livecode

Task condition

It is necessary to predict what values will appear in the console after running the following JavaScript code.

function Count() {
  let counter = 0;

  return () => {
    console.log(counter++);
  };
}

const c = new Count();

c(); // 
c(); // 

c.counter = 0;

c(); // 

const b = new Count();

b(); //