Functions
Scope
Arrays & Their Methods
Loops & Iterators
Potpourri
100

To call a function in your code, you would type the function name followed by ______

Parentheses

100

This type of scope refers to the context where variables are accessible to every part of the program.

Global Scope

100

This is a type of list in JavaScript which can store any data types such as Strings, numbers, and booleans.

Array

100

This type of loop usually contains three expressions separated by a semi-colon inside of parentheses.

for loop

100

True or False

In JavaScript, an Array is a type of object.

True

200

We can call the same function as many times as needed. 

True or False

True

200

These types of variables exist within block scope and are not accessible to other parts of the program.

Local Variables

200

Each item inside of an Array is called an ________.

Element

200

A _____ loop is a loop that is running inside of another loop.

Nested

200

This method is used to add one or more elements to the end of an Array and returns the new length of the array.

push() method

300

When declaring a function, we can specify its ______ within parentheses. We use ______ as placeholders for information that will be passed to the function when it is called.

Parameters

300

______ pollution is when too many variables exist in a namespace or variable names are reused.

Scope

300

Each element in an array has a numbered position known as its _______.

Index

300

With this type of loop, the counter variable is declared before the start of the loop and the condition is checked before entering the code block.

While loop

300

This method removes the last element from an array and returns that element.

pop() method

400

The values that are passed to the function when it is called are called ______

Arguments

400

The code below will print _____ to the console.
let num = 50;
function printNum() {
let num = 100;
console.log(num)
}
printNum()

100

400

This method is used to insert elements to the beginning of an Array.

unshift()

400

With this type of loop, the condition is checked after the code block is executed ensuring that it runs at least once.

do ... while loop

400

What will be printed to the console?

let arr = ["red", "blue", ["yellow", "green", "purple"]];

console.log(arr[2][1]);

green

500

When a _____ statement is used in a function body, the execution of the function is stopped and the code that comes after it will not be executed.

Return

500

What will be the output of the code below?

function(getName) {

let myName = "Brittany";

}

console.log(myName);

Reference Error: myName is not defined

500

This method can be used to remove or replace existing elements in an Array or to add elements in place. (modifies the original Array)

splice()

500

The _____ keyword allows a program to exit completely out of the loop when a condition is met.

Break

500

What values will the array (const arr) hold after the code runs?

const arr = ["red", "blue", "green"];

arr[0] = "yellow";

["yellow", "blue", "green"]