Junior — Senior
Determine the output in the console (example 38)
livecode
Task condition
It is necessary to predict what the following JavaScript code will output.
const circle = {
r: 10,
getDiameter() {
return this.r * 2;
},
getPerimeter: () => 2 * Math.PI * this.r
};
console.log(circle.getDiameter());
console.log(circle.getPerimeter());