-1

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

2
  • 2
    Yes. Why isn't it working for you? Perhaps you could post some code. Commented Nov 19, 2009 at 9:45
  • 1
    Take a look here: stackoverflow.com/questions/812961/… Commented Nov 19, 2009 at 9:51

2 Answers 2

0

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.

Sign up to request clarification or add additional context in comments.

Comments

0

I think you are looking for something like reflection.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.