Variables
If/Else
Loops
Functions
Arrays/Strings
100

What data type is "hello"?

(number, boolean, string, undefined)

string

100

What will this print?

let x = 10;

if (x>5) {

console.log ("Yes");

}

Yes

100

How many times does this loop run?

for (let i = 0; i < 3; i++)


3

100

What keyword defines a function?

(def, function, func, create)

function

100

What is the first index in an array?

0

200

What data type is "true"?

(string, boolean, number, object)

boolean

200

Which operator should be used to compare values?

==

200

What will this print?

for (let i = 0; i < 2; i++) {
    console.log(i);
}


0, 1

200

What does return do?

Sends value back

200

What prints?

let nums = [1, 2, 3];
console.log(nums[1]);

2

300

Which keyword is used to declare a variable?

(var, let, make, define)

let

300

What will this print? 

let x = 2;
if (x > 5) {
    console.log("A");
} else {
    console.log("B");
}

B

300

Which loop runs while a condition is true?

(for, repeat, while, loop)

while

300

What is printed?

function add(a, b) {
    return a + b;
}
console.log(add(2, 3));

5

300

What does this do?

"text".toUpperCase()

makes uppercase

400

What data type is 3.5 in JavaScript?

(integer, float, number, decimal)

number

400

What is wrong with this code?

if (x = 5)


Should use ===

400

What part updates the loop variable?

for (let i = 0; i < 5; i++)


i ++

400

What are a and b called? 

(arguments, variables, parameters, inputs)

parameters

400

What prints?

let word = "hello";
console.log(word[0]);

h

500

What is wrong with this variable name?

let 2name = "Alex";

cannot start with a number

500

What keyword is used for another condition?

(else if, repeat, next, continue) 

else if

500

What happens if the loop condition never becomes false?

Infinite loop

500

What are values passed into a function called?

(parameters, arguments, returns, variables)

arguments

500

What does this return?

"hello".substring(1,4)

ell

M
e
n
u