Complex Booleans
if/else if/else
While Loops
Vocabulary
Graphics
100

Result of: 

true && false

What is false?

100

This keyword begins a conditional statement in JavaScript.

What is if?

100

The name for a loop that never stops running. 

What is an infinite loop.

100

A named container that stores a value in your program.

What is a variable?

100

This graphics element is where JavaScript games draw their graphics.

What is the canvas?

200

let x = 5;

x > 3 || x < 0

What is true?

200

This keyword runs a block of code when the if condition is false.

What is else?

200

This is how many times "Go" prints: 

let i = 0;
while (i < 3)
{
    console.log("Go!");
    i++; 

}

What is 3?

200

This is the term for a value of true or false.

What is a boolean?

200

This is the location of the origin (0, 0) on a canvas.

What is the top-left corner?

300

This operator flips a boolean.
 

What is ! (Not).

300

let score = 75;

if (score >= 90) { console.log("A"); }
else if (score >= 80) { console.log("B"); }
else if (score >= 70) { console.log("C"); }
else { console.log("F"); }

 What is the output?

What is C?

300

This loop will run forever without this line: 

let enemies = 5;
while (enemies > 0) { console.log("Fighting!"); }

What is enemies-- or enemies = enemies - 1. 

300

This term describes a reusable block of code that performs a task and can be called by name.

What is a function?

300

The two methods used to "get" the size of the canvas. 

What is getWidth() & getHeight()

400

let a = 4;

let b = 9;

(a < 5 && b > 10) || !(a == 4)

What is false?

400

Find the bug:

let lives = 3;

if(lives = 0){ console.log("You have no more lives");}
else{console.log("Let's play")}

What is if(lives = 0) should be if(lives == 0). 
400

The final value of count after the end of the loop.
let count = 10;
while (count > 2) { count -= 3; }

What is 1?

400

This is the term for the process of finding and fixing errors in your code.

What is debugging?

400

The dimensions of the pole(p):
const buildWidth = 50;
const buildHeight =175;
const x = 150;
const y = getHeight();

let b = new Rectangle(buildWidth, buildHeight);
b.setPosition(x, y);
add(b)

let p = new Rectangle(5, buildHeight/7);
p.setPosition(x + (buildWidth/2), y - buildHeight);
add(p)

What is width: 5 height: 25. 

500

A player can jump only if they are on the ground, OR if they have a double jump available AND are NOT stunned. Write the expression that correctly represents that rule, using onGround, hasDoubleJump, and isStunned.
 

What is onGround || (hasDoubleJump && !isStunned).

500

let healt = 0;
let hasShield = true;

if (health > 0) { console.log("Alive"); } 

if (hasShield) { console.log("Protected"); }
else { console.log("Exposed"); }

The output? 

What is Protected?

500

The number of times the loop will run. 

let x=0;
while(x<10){
x+=2;
x++;}

What is 4?

500

The term for a specific set of instructions for the computer to execute in an effort to complete a designated task. 

What is an algorithm?

500

The position of the pole(p) - canvas size (400, 480):
const buildWidth = 50;
const buildHeight =175;
const x = 150;
const y = getHeight();

let b = new Rectangle(buildWidth, buildHeight);
b.setPosition(x, y);
add(b)

let p = new Rectangle(5, buildHeight/7);
p.setPosition(x + (buildWidth/2), y - buildHeight);
add(p)

What is (175, 305).