What does the following JavaScript code print (console output, as in Node.js)?
const circle = {
r: 2,
get area() { return 3 * this.r ** 2; },
};
circle.r = 3;
console.log(circle.area, typeof Object.getOwnPropertyDescriptor(circle, "area").get);
The getter runs on every read, so it uses the current r (3 × 9 = 27). The property's descriptor holds the get function instead of a value.