For Loops
AP Test Facts
Variables
Random JavaScript Facts
Conditionals
100

lets us repeat code a fixed number of times.

For Loop

100

The portion of the test where you have to code a program. (Hint: PT)

"Performance Task"
100

Declare a variable called school and set its value to the name of your school.

var school = "Name of Our School";
100
The year that JavaScript was created

1995

100

Will this expression evaluate to TRUE or FALSE?

var grade = 90;
if (grade > 90)


FALSE

200

This tells our program that our loop should only run when this statement is true

Condition

200

The website where you sign up for the AP CSP Test

College Board / AP Classroom

200

Set the value of a variable named numOfPeople to the sum of 5 and 6. 

numOfPeople = 5 + 6;
200

The website that was created using JavaScript with the most monthly users

Google

200

Write an if statement (no body, just the first line) that tests whether age is not equal to 18.

if (age !== 18)
300

i++ - This feature tells our program to add 1 to the variable i each time the loop is executed

Increment

300

The date the performance task is due. (Hint: Spring)

May 1st

300

If the value of price is 200, what is the value of the variable of total after the following line of code?

total = price + "10";


20010

300

The number of days JavaScript took to develop (Hint: Less than 2 weeks)

10 Days

300

What is the value of todayIsMyBirthday after this code runs?

birthday = "May 14";
if (birthday === "March 22") {
	todayIsMyBirthday = true;	
}
else {
	todayIsMyBirthday = false;
}

FALSE

400

Declares a variable that keeps track of how many times our loop has executed

Initialization

400

The date of the AP Computer Science Principles End-of-Course Exam (Hint: Spring)

May 8th, 2023

400

If the value of the variable name is "Jeff", please create a new variable called greeting, and set its' value to "Hello, Jeff" using the variable name.

var greeting = "Hello, " + name;
400

The State Javascript was created in (Hint: West Coast)

California
400

Write an if statement that sets a variable named winner to "p1" if the value of a variable named p1hand is "rock" and the value of a variable named p2hand is "scissors".

if (p1hand === "rock" && p2hand === "scissors") {
	winner = "p1";
}
500

The name for having one loop inside of another

Nested Loops

500

The highest score you can earn on the AP Exam

5	
500

Write code to increase the value of the variable total by 4.

total = total + 4;

500

The Creator of Javascript

Brandon Eich

500

Write an if statement that sets a variable named type to "produce" if the value of a variable named food is "fruit" or "vegetable", but sets type to "not produce" if not.

if (food === "fruit" || food === "vegetable"){
  type = "produce";
}
else {
  type = "not produce";
}
M
e
n
u