-
What is an expression?
An expression is a fragment of code that produces a value. Every value that is written is an expression. An expression between two parenthesis is also an expression. Expressions can contain other expressions. -
What is a binding?
A binding is a way in JavaScript to catch and hold values. You can use Var (Variable); Const (Constant) or Let. When a binding points to a value, it does not mean that its tied to that value forever - = will break it. -
What is an environment?
An environment is a collection of bindings and their values that exists at a given time. -
What is a function?
A function is a piece of a program wrapped in a value that can be applied in order to run a wrapped program. -
Give an example of a function.
prompt
math.max
math.min -
What is a side effect?
A side effect is a statement that has an affect either by producing something on screen or changes the internal state of the machine in a way that affects the statements that come after it. -
Give an example of a function that produces a side effect and another function that produces a value.
Example of a function that produces a side effect, is prompt - this function will create a dialog box (which is the side effect).
Example of a function that produces a value is math.max - this function will produce a value (which is the side effect).
-
What is control flow?
A control flow is the order in which a program is executed when it has more than one statement - top to bottom. -
What is conditional execution?
A conditional execution is when we cause a code to be executed only if a certain condition is present. - If, else, switch are examples. -
What kind of keyword do you need to use to invoke conditional execution?j
If, else, switch
[/quote]