Variables and Booleans
Boolean Logic
Functions and Events
Miscellaneous
100

What does a variable do? 

A variable stores a value, such as a number, the score, or button that was pressed.
100

How would you write "AND" in code with booleans?

the symbol && is called in AND in javascript.

100

What is a function?

A function is like a verb - it does something.

100

What language do we program in?

Javascript

200

How would you create a variable called x that holds or stores the value 10?

You would write:

var x = 10;

200

What does the ! mean in Javascript?

The ! means "NOT"

200

What goes inside a functions parantheses?

The parameters

200

What does each line of code have to end with?

A semicolon (;)

300

What is a boolean?

A boolean is a value that is either true or false/

300

How do you write greater than or equal to in code?

The code for the greater than or equal to symbol is >=

300

How do you tell computers what color you want to fill something with?

You use hex. For example, red in hex is #FF0000

300

What is an object?

An object is anything in your game that you can program to do something. 

400

How do you create variables in the scene object?

Variables in the scene object are the only variables that don't have var before the name. Instead, write

$this.x = 10;

to create a variable in the 

400

Where are booleans used mostly in code?

They are either used in variables or in conditionals to test if something happened.

400

What event should you put the createTimer function in?

the createTimer function should always be put in the Initialize when Scene Starts event

400

What is a conditional?

A conditional checks to see whether a condition is true (if (5 > 0) { ...}), and does something if the condition is true.

500
How do you access variables that are created in the scene/game object

You write something like:

$this.scene.x;

to get the variable x defined in the scene view.

500

What does the code below evaluate to?


!True || False

In english, the statement means 

"NOT True or False" 

which becomes

"False or False"

which evaluates to False.

500

What is an event?

An event is something that the player or user does, such as press a button, click a mouse, drag an object, etc.

500

What are the x, y, and z coordinates, and what do they mean.

X-coordinate: How far left or right something is

Y-coordinate: How far up or down something is

Z-Coordinate: How far in or out of the screen something is (which object is in front or behind)