Javascript- objects Flashcards

1
Q

What are objects used for?

A

group togther a set of variables & functions to create a model.
variables & functions take on a new name

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

What are object properties?

A

variables = object properties

it tells us about the object

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

Describe object literal notation

A

is the curly braces + their content, there is a colon for every key coma separate each property

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

How do you remove a property from an object?

A

use delete operator

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

What are the two ways to get or update the value of a property?

A
  1. dot notation= object.new property

2. bracket notation= object [‘new property’]

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