Functions I
Functions II
Const Let Var / Data
Arrays + Objects
Miscellaneous
100

What is the proper term for "name" in the example below:

What is a parameter

100

What is the proper term for the values 5 and 3 in the example below?


What is an argument

100
______ can be reassigned while ______ cannot
Var and let can be reassigned while const cannot
100
What makes a complex data type complex?
It can hold many pieces of data
100

______ produce new values while _______ produce behavior


Ex:

5 + 5 produces a new value 10

console.log('hi'); produces a behavior

Expressions produce new values while statements produce behavior

200

How would you call this function?

greet("ben");

200

What is the result of the following piece of code:

"Ben!!!" be printed to the console

200

What is the result of the following code

A reference error will be produced! a is not defined

200
How would access "ben" from the array and object below?


arr[2]

obj.name

200

Are the following values truthey or falsey?


0, "", null, undefined, NaN

Falsey

300

Is a Function an example of a First Class Object?

Yes

300
The term for the function below:


What is an Anonymous Function
300

_____ are finite in size and are copy-by-value

_____ are infinite in size and are copy-by-reference

simple data types, complex data types

300

This is how you can determine whether or not a piece of data is an array

Array.isArray()

300

What is the name of the following operators?


&&, ||, !

Logical Operators

400

What is a Higher Order Function

It is a function that accepts a function as input or returns a function

400

The three parameters for the function passed to each

The element/value, the index/key, the array/object

400

What is the scope of var, let, and const?

var is scoped to functions while let and const are scoped to code blocks

400
Create a loop that iterates over an Array and prints out each index and each value in the array. Use the array below as an example:


400

What is the role that logging values to the console plays in programming?

Logging is mainly used for debugging purposes. A programmer can peer into the program as it runs and, by logging a value at a certain point, can determine whether or not the program is behaving as expected.

500
What does the function each do? What are its arguments and what does it return?
The function each() performs an action on each element in a collection. It accepts a collection and a function as arguments. It does not return anything


500

What does the filter function do? What are its inputs and what does it return?

Filter returns an array of values from a collection that pass a test function. It accepts a collection and a test function as input. It returns an array.

500

What is the difference between copy-by-value and copy-by-reference?

Simple data types are copy-by-value which means that when a variable A is assigned to variable B, variable A copies the value held by B. If variable B changes, variable A is unchanged.

Complex data types are copy-by-reference which means if variable A is assigned to variable B, variable A copies the memory reference to the value held by B. If variable B changes, the reference changes and therefor A also changes.

500

Create a loop that iterates over an Object and prints out each key and each value in the object. Use the object below as an example:

500

What makes a Function a First-Class Object?

Functions can:

1) be stored in a variable

2) be accepted as an argument to a function
3) be returned by a function