Javascript 5.1 Dynamic Objects Flashcards

1
Q

What is Node js and what is it used for?

A

Node js is a runtime environment for executing Javascript code and is used to build back-end services called APIs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are “Primitive values”?

A

Primitive values are all immutable values such as strings, null, and undefined. Objects are not primitive.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The state of an object is represented by its ___? and the behavior of a property is represented by its ___?

A

Properties and Methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define “encapsulation”

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How would we call ` bark: function(){
console.log(‘Woof!’)}; ` stored in a variable called ernie?

A

ernie.bark();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Define ‘Classes’

A

Classes are templates for creating objects. They encapsulate data with code to work on that data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define ‘Constructor’

A

The constructor method is a special method for creating and initializing an object with a class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is ‘this’?

A

In javascript, ‘this’ keyword refers to an object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What method is used to get and retrieve a value in a class?

A

The “get(){}” method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are ‘Getters’ and ‘Setter’ methods defined?

A

1.defined using object initializers 2. added later to any object at any time using a getter or setter adding method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Define ‘Setter’ methods

A

A ‘setter’ method is a method that sets the value of a specific property.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Define ‘Dynamic Programming Language’

A

A language that executes at runtime - runtime meaning the period of time which a program is running.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly