Level 7
Level 8

Next Stop: Function Junction

18 words 0 ignored

Ready to learn       Ready to review

Ignore words

Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.

All None

function definition
A ____ consists of the function keyword, name of the function, list of comma separated arguments in parens and a block statement in curly braces which defines what the function does.
non-primitive value
If you pass a ____, such as an array or user-defined object, to a function any changes made to the object passed will be visible outside of the function.
Functions created without a name are referred to as ____ functions.
A ____ is a function that is a property of an object.
A function is not executed when it is created. You must ___ the function in order for it to run.
You can declare a function anywhere within the current scope. JavaScript creates all the functions in a scope ____ they are executed. This is not the case, though, when you store a function in a variable.
not limited
The arguments of a function are ____ to strings and numbers. You can pass whole objects to a function.
recursive function
A function that calls itself is considered a ____. Recursion is very similar to control flow looping.
are objects
It turns out that functions in JavaScript actually ____. There are even special methods associated with functions, for example the apply() method.
are not accessible
Variables defined inside of a function ____ from outside of the function. A function does have access to its parent function's variables, though.
nested function
A function declared within another function is called a ____. This inner function is private, only accessible to the function within which it was declared.
A nested function has access to its parent function's arguments and variables, otherwise known as scope. The parent does not have access to the nested function's scope. This "one-way street" is know as function ____.
scope chains
Multiply-nested functions result in ____. If function A is the parent of B which is the parent of C, that means C has access to A's and B's scope, but not vice versa. This is due to the "one-way street" known as closure.
What the this variable refers to ____ on where the function was called, not where it was defined.
The arguments of a function are maintained in an ____ object. This object does not possess all of the array-manipulation methods.
Use ____ to determine how many arguments were passed to your function.
default parameters
To avoid getting undefined when arguments are not provided use ___. In this example, we set b's default value to 1: function multiply(a, b = 1) { return a*b; }
arrow functions
____ are a new way to define functions. They are very short. The syntax is this: (parameters) => { statements; } Example: s => { myArray.push(s); } This type of function definition is not fully supported by all browsers yet.