Use getters and setters to Control Access to an Object, freeCodeCamp's Learn ES6 Syntax Challenges

Channel:
Subscribers:
8,020
Published on ● Video Link: https://www.youtube.com/watch?v=VftR1YePDOc



Duration: 9:17
3,500 views
74


In today's lesson, we look at getters and setters in Javascript ES6 syntax. The purpose of getters and setters is to allow other users to obtain or get, values as well as change, or set, values of properties within objects. We are about to create a class object and construct it according to what we specify in the get and set part of our class. In the constructor part of the class, we specify the properties the object will have, and when we create our class, those properties will be a part of it. The purpose of the getter and setter is to only allow users to access the get and set functions and not direct access to the private variables. Understanding classes is vital for this javascript tutorial and I recommend starting this course from the beginning if you are having trouble. Understanding function declarations and syntax is important as well and you may want to review some of our Javascript tutorials if you are having trouble remembering basic Javascript syntax.

Check out weWillCode.com/courses to access all courses for free. We Will Code is here to help you if you have any questions. Comment through Youtube or Facebook by searching for "We Will Code".




Other Videos By We Will Code


2019-12-30Handle a Rejected Promise with catch, Learn ES6 on freeCodeCamp 2020
2019-12-26Handle a Fulfilled Promise with then, freeCodeCamp's ES6 Challenges
2019-12-23Complete a Promise with resolve and reject, freeCodeCamp's Learn ES6 Challenges
2019-12-22Create a Javascript Promise, freeCodeCamp's ES6 Challenges on freeCodeCamp
2019-12-22Import a Default Export, freeCodeCamp's ES6 Lessons and Explanations
2019-12-21Create an Export Fallback with export default, freeCodeCamp's ES6 JS Syntax
2019-12-21Use * to Import Everything from a File, freeCodeCamp
2019-12-21Reuse Javascript Code Using import, freeCodeCamp's ES6 Challenges, Javascript Help 2020
2019-12-20Use export to Share a Code Block, ES6 Challenges freeCodeCamp, WebDev Tutorials
2019-12-18Create a Module Script, Learn JS ES6 Syntax on freeCodeCamp, Learn to Code Free Online Tutorial
2019-12-17Use getters and setters to Control Access to an Object, freeCodeCamp's Learn ES6 Syntax Challenges
2019-12-03Use class Syntax to Define a Constructor Function, ES6 tutorial, Learn ES6 Syntax
2019-12-02Write Concise Declarative Functions with ES6, Learn ES6 Syntax
2019-11-29Write Concise Object Literal Declarations Using Object
2019-11-28Create Strings using Template Literals, Learn JS ES6
2019-11-26Use Destructuring Assignment to Pass an Object as a Function's Parameters,Learning Destructuring ES6
2019-11-24Use Destructuring Assignment with the Rest Parameter to Reassign Array Elements, Learn JS 2020
2019-11-23Use Destructuring Assignment to Assign Variables from Arrays, Learning JS ES6 2020, Web Dev
2019-11-22Use Destructuring Assignment to Assign Variables from Nested Objects, Learning the ES6 Syntax
2019-11-21Use Destructuring Assignment to Assign Variables from Objects, An ES6 Course Introduction
2019-11-20Use Destructuring Assignment to Extract Values from Objects, freeCodeCamp tutorials for ES6



Tags:
es6 syntax
javascript getters and setters
getter functions
setter functions
learning functions