fill in the blanks to declare a class point with a constructor initializing its x & y members | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
+ 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