What does this program print?

from Proxy and Reflect
Node 24 intermediate 3 min

What does this program print?

JavaScript
const target = {};
Object.defineProperty(target, "id", {
  value: 7,
  configurable: false,
});

const proxy = new Proxy(target, {
  ownKeys() {
    return [];
  },
});

try {
  console.log(Object.keys(proxy));
} catch (error) {
  console.log(error.name);
}
Open in playground
Report an error