Data Types
If/Else
Arrays
100

What key word is used to create a variable in JavaScript?

var
100
What is the structure of a proper if statement (with no else if or else)

if (condition) {

code

}

100

The name of this function:

function addToJeopardyScore() { }

addToJeopardyScore

200

How do you get the length of a string?

.length

200

What is the name of a variable that can only take the values true or false

boolean

200

How do I get the element "code" out of the array:

arr = ["learning", "to", "code", "is", "fun!"]

arr[2]

300

Name 2 types of data in Javascript

Number, string, boolean, array, object

300

What symbol(s) can I use to return true if ONE or BOTH boolean expressions are true, and false otherwise? ex. expr1 __ expr2

||

300

How do I add the item 2 to the array

arr =[1, 3, 1]

arr.push(2)

other acceptable answers

400

What is the index of the "w" in "Hello world!"

6

400

What will the following statement print?

If (true || false) {print("Hello ")}

If (true && false) {print("World")}

else {print("!")}

Hello!

400

Name one way to remove an element from an array

.pop(), .shift(), .slice()

500

What function call would I use to get only the "love" out of var s = "I love Javascript!"

s.slice(2, 6)

500

What will x be equal to at the end of this statement?

x = ""

if (x) {x += "Python"}

if (!x) {x += "JavaScript"}

if (x.length > 6) {x += " is the best"}

else if (x.length < 100) {x += " is the worst"}

else {x += "!"}

JavaScript is the best

500

how might I combine the following arrays into a single array with all of the names?

var names1 = [“Jennie”, “Rose”]

var names2 = [“Jisoo”, “Lisa”]

var allNames = names1.concat(names2)

M
e
n
u