Modern JavaScript Videos
About Lesson

In this lesson we want to learn about javaScript Getters and Setters, In JavaScript, getters and setters are special methods that are used to access and modify the values of an object’s properties. Getters and setters were introduced in ECMAScript 5 (ES5) and provide a way to control access to object properties and ensure that they are accessed and modified in a consistent and secure way. A getter is  method that is used to get the value of a property. Getters are defined using the get keyword followed by the name of the property that you want to get.

 

 

Join the conversation