Coding 101 !




What are Variables?

A variable is a way to store data and use it throughout your code.
You begin your variable code by typing var and then the following text
will be the name of your variable and the information you want that
variable to store. The data that is stored in a variable can be changed later on
throughout the code.

Examples:

- var year = 2025
- var age = 16
- var favColor = "light pink"




What are Lists?

A list is the same as a variable, the code begins with var
and then the name of your variable, the difference is that regular
variables only store one thing at a time meanwhile lists can store
multiple things.

Examples:

- var years = [2025, 2026, 2027]
- var ages = [16, 17, 18, 19]
- var favColors = ["light pink", "blue", "red"]




What are Boolean Expressions?

A boolean expression is a way of making a code that will become true
or false based on the user's input. There are multiple kinds of
boolean expressions. Some include only one expressions while other combine
multiple expressions using either and (&&) or or (||). If the expressions
use and (&&) then it means that all of the expressions must be true for it
to default to true, if even one of them is false then the whole thing defaults to
false. Meanwhile with or (||) only one of the expressions have to be true for the
whole thing to default to true.

Examples:

- true expression && false expression → false
- true expression || false expression → true
- false expression → false




What are If-Statements?

An if-statement is like the name says, if the thing in the if-statement
becomes true then the code inside the statement occurs. If the thing in
the statement doesn't become true then the code inside the statement
doesn't occur.

Examples:

- if (color == "pink") → setScreen ("pinkScreen");
- if (age == 16) → ticketPrice = 20;
- if (number == "0") → showElement("victoryText")