Question #193

Author: admin
tags: TypeScript  
class Position {
  x: number = 10;
  y: number = 20;

  constructor() {
    this.x = 7;
    this.y = 8;
  }
}

const p = new Position();

console.log(p); // ??
What will be printed?
{ x: 7, y: 8 }
{ x: 10, y: 20 }
Nothing. This TS code will not be compiled to JS because of error.
Rate the difficulty of the question:
easyhard