0

fill in the blanks to declare a class point with a constructor initializing its x & y members

ECMAScript 6

4th Apr 2020, 3:38 AM
MARIO PEREZ SALAZAR
MARIO PEREZ SALAZAR - avatar
3 odpowiedzi
+ 2
Have you tried to do?
4th Apr 2020, 5:02 AM
A͢J
A͢J - avatar
+ 2
Here is the solution: class Point { constructor (a, b) { this.x = a; this.y = b; } getX() { return this.x; } getY() { return this.y; } }
10th Aug 2021, 9:16 AM
Owethu Sotomela
Owethu Sotomela - avatar
+ 1
class constructor }
20th Sep 2022, 11:43 AM
LIPSA BEHERA