Use getters and setters to Control Access to an Object (ES6) freeCodeCamp tutorial

preview_player
Показать описание
Do you need more help with coding?
════════════════════════════

Certification: JavaScript Algorithms and Data Structures
Course: ES6
Lesson: Use getters and setters to Control Access to an Object
freeCodeCamp tutorial

In this lesson, we learn how to use getters and setters.

Let's Connect 💯:
════════════════════════════
Рекомендации по теме
Комментарии
Автор

Thank you so much for the explanation, I've been searching for this particular solution for a little while now. Thank you

georgebassey
Автор

i'm not understanding why for the setter, we would use that equation instead of the same equation as the getter if the instructions say "In the class, create a getter to obtain the temperature in Celsius and a setter to set the temperature in Celsius." can you please explain? to me they sound the same

kittyz
Автор

I don't really understand how this all works. The author does not clearly explain why there is such complexity if everything can be described by an ordinary function?

dogvscatfunny