Javascript 5.1 Dynamic Objects Flashcards
What is Node js and what is it used for?
Node js is a runtime environment for executing Javascript code and is used to build back-end services called APIs
What are “Primitive values”?
Primitive values are all immutable values such as strings, null, and undefined. Objects are not primitive.
The state of an object is represented by its ___? and the behavior of a property is represented by its ___?
Properties and Methods
Define “encapsulation”
Encapsulation is the process of binding the data (i.e. variables) with the functions acting on that data. You will see this when you add properties that also include methods in a single variable.
How would we call ` bark: function(){
console.log(‘Woof!’)}; ` stored in a variable called ernie?
ernie.bark();
Define ‘Classes’
Classes are templates for creating objects. They encapsulate data with code to work on that data.
Define ‘Constructor’
The constructor method is a special method for creating and initializing an object with a class.
What is ‘this’?
In javascript, ‘this’ keyword refers to an object
What method is used to get and retrieve a value in a class?
The “get(){}” method
What are ‘Getters’ and ‘Setter’ methods defined?
1.defined using object initializers 2. added later to any object at any time using a getter or setter adding method
Define ‘Setter’ methods
A ‘setter’ method is a method that sets the value of a specific property.
Define ‘Dynamic Programming Language’
A language that executes at runtime - runtime meaning the period of time which a program is running.