Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
12 Cards in this Set
- Front
- Back
show an example of an Object
|
var myObj = {};
|
|
why do you have to use this on member methods and variables
|
1
|
|
2
|
2
|
|
what is an object? |
An object is a collection of properties in key/vlaue pairs. |
|
How do you use a constructor to create an object? |
You use the new keyword. var myfriend - new friend('Ezell'); |
|
what is an object literal? |
Its when you create an object by defining and instantiating in one step. var myobj = { name:'ezell'}; |
|
What is a object constructor? |
Is a function used to create multiple instances of an object. Each instance inherits the methods and properties of the constructor function. |
|
what is a host object? |
An object that is defined by the environment it is run in |
|
What are some objects defined by the web browser environment? |
|
|
What are core objects in javascript?
|
|
|
Establish a parent Object and a child object and make the child object inherit all the properties of the parent object through prototypal inheritance. |
var Parent = function(){ this.parentProperty = "Ezell"; this.parentMethod = function(){ console.log("hi from parent"); } var Child = function(){ this.childProperty = "Donovan"; this.parentMethod = function(){ console.log("hi from child"); } } Child.prototype = new Parent(); |
|
How would you overide a parent object method from a child class? |
you would access the prototype of the child and overide it there Child.protrparentProperty |