What does a variable do?
How would you write "AND" in code with booleans?
the symbol && is called in AND in javascript.
What is a function?
A function is like a verb - it does something.
What language do we program in?
Javascript
How would you create a variable called x that holds or stores the value 10?
You would write:
var x = 10;
What does the ! mean in Javascript?
The ! means "NOT"
What goes inside a functions parantheses?
The parameters
What does each line of code have to end with?
A semicolon (;)
What is a boolean?
A boolean is a value that is either true or false/
How do you write greater than or equal to in code?
The code for the greater than or equal to symbol is >=
How do you tell computers what color you want to fill something with?
You use hex. For example, red in hex is #FF0000
What is an object?
An object is anything in your game that you can program to do something.
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
Where are booleans used mostly in code?
They are either used in variables or in conditionals to test if something happened.
What event should you put the createTimer function in?
the createTimer function should always be put in the Initialize when Scene Starts event
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.
You write something like:
$this.scene.x;
to get the variable x defined in the scene view.
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.
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.
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)