lets us repeat code a fixed number of times.
For Loop
The portion of the test where you have to code a program. (Hint: PT)
Declare a variable called school and set its value to the name of your school.
var school = "Name of Our School";
1995
Will this expression evaluate to TRUE or FALSE?
var grade = 90; if (grade > 90)
FALSE
This tells our program that our loop should only run when this statement is true
Condition
The website where you sign up for the AP CSP Test
College Board / AP Classroom
Set the value of a variable named numOfPeople to the sum of 5 and 6.
numOfPeople = 5 + 6;
The website that was created using JavaScript with the most monthly users
Write an if statement (no body, just the first line) that tests whether age is not equal to 18.
if (age !== 18)
i++ - This feature tells our program to add 1 to the variable i each time the loop is executed
Increment
The date the performance task is due. (Hint: Spring)
May 1st
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
The number of days JavaScript took to develop (Hint: Less than 2 weeks)
10 Days
What is the value of todayIsMyBirthday after this code runs?
birthday = "May 14"; if (birthday === "March 22") { todayIsMyBirthday = true; } else { todayIsMyBirthday = false; }
FALSE
Declares a variable that keeps track of how many times our loop has executed
Initialization
The date of the AP Computer Science Principles End-of-Course Exam (Hint: Spring)
May 8th, 2023
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;
The State Javascript was created in (Hint: West Coast)
California
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"; }
The name for having one loop inside of another
Nested Loops
The highest score you can earn on the AP Exam
5
Write code to increase the value of the variable total by 4.
total = total + 4;
The Creator of Javascript
Brandon Eich
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"; }