0

Can we create a class with getters and setters and an array of objects of this class using javascript?

random
  • 10,238
  • 8
  • 57
  • 101

2 Answers2

1

Javascript is not a class based object oriented language. However we can mimic this behavior. This article is about implementing private variables but it may help you to design this class.

Tinku
  • 1,592
  • 1
  • 15
  • 27
0

I think you are looking for something like reflection.

Ben Fransen
  • 10,884
  • 18
  • 76
  • 129