TypeScript |TypeScript Object Oriented Programming | Question4

Last Updated :
Discuss
Comments

What is the purpose of a setter in a class?

To define a method that performs an action

To retrieve the value of a private property.

To set or modify the value of a private property.

To call a constructor with parameters.

Share your thoughts in the comments