• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/10

Click to flip

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;

10 Cards in this Set

  • Front
  • Back

What are the two hidden properties that a function is created with?

1. The functions context


2. The code that implements the function's behavior

Can functions be passed as an argument for another function?

Yes

What is a method

A subroutiene associated with the object of a class that defines the interface through which outside members of the class (other objects) can access it's private members (encapsulated data)

What is a function literal?

An expression that defines an un-named function

What four parts compose a function literal?

1. Reserved word "function"


2. function's name (optional... user-defined)


3. the function's parameters wrapped in "()"


4. the set of statements wrapped in "{};"

What is "closure"?

A function object created by a function literal contains a link to the outer context. Example:



function init() {


name = "Taylor";


function displayName(){


console.log(name);


}


};

Every function receives two additional parameters. What are they?

"this" and "arguments"

What is "invocation" in JS?

Invocation literally invokes a function.

What are the four patterns of invocation in javascript?

1. The Method Invocation Pattern


2. The Function Invocation Pattern


3. The Constructor Invocation Pattern


4. The Apply Invocation Pattern

The Method Invocation Pattern

When a function is stored as a property of an object, we call it a method.



var object = {


name: "taylor",


nameproducer: function (name) {


//some function statement


}


}