0
fill in the blanks to declare a class point with a constructor initializing its x & y members
ECMAScript 6
3 ответов
+ 2
Have you tried to do?
+ 2
Here is the solution:
class
Point {
constructor
(a, b) {
this.x = a;
this.y = b;
}
getX() { return this.x; }
getY() { return this.y; }
}
+ 1
class
constructor
}