这段程序会输出什么?

来自 类
Node 24 入门 2分钟

这段程序会输出什么?

JavaScript
class Counter {
  count = 0;

  increment() {
    this.count += 1;
  }
}

const first = new Counter();
const second = new Counter();

console.log(Object.hasOwn(first, 'count'), Object.hasOwn(first, 'increment'));
console.log(first.increment === second.increment);
在试验场中打开
报告错误