JavaScript Setter Methods Explained, Examples of Setter Methods in JavaScript, Codecademy Learn JS

Published: 23 March 2022
on channel: We Will Code
184
4

In this lesson we take a look at JavaScript Setter Methods Explained, Examples of Setter Methods in JavaScript, Codecademy Learn JS. This is based on Codecademy's Learn JavaScript course, Advanced Objects section, lesson, "Setters". In it we learn how to properly set up a setter method. We learn that we use setter methods to be able to reassign values of specific properties within our objects. We are also taught that similar to getter methods, setter methods allow us to check input and perform certain actions on properties. They also help us display clear intention for how our object should be used. We are reminded that, nonetheless, even having a setter method, it is still a possibility to directly reassign properties, so we must always be careful. Learn about getters and setters is important for anyone learning JavaScript. Knowing both getters and setters is important so you know how your object should be behaving and it also allows other developers to easily understand what your objects do. Make sure to practice using getters and setters by making your own. Make various objects with different properties, getter and setter methods included. Make sure to understand getters and setters in javascript before moving on from this lesson.


On this page of the site you can watch the video online JavaScript Setter Methods Explained, Examples of Setter Methods in JavaScript, Codecademy Learn JS with a duration of hours minute second in good quality, which was uploaded by the user We Will Code 23 March 2022, share the link with friends and acquaintances, this video has already been watched 184 times on youtube and it was liked by 4 viewers. Enjoy your viewing!