- What is an expression?
Pieces of the overall puzzle, can contain several chunks of puzzle contained together. A collection of expressions becomes a statement. A list of statements a program.
A fragment of code that creates a value.
- What is a binding?
A binding allows the storage of a piece of information. For ecample let + name = whatever allows us to hold within the memory that name is equal to whatever. Defined bindings become expressions. The existing bindings are the environment.
Allows the machine to hold an internal state
- What is an environment?
There may be a set of functions already described within the environment. When these functions are attempted then this is the environment.
- What is a function?
A function is a set of instructions carried out to a set of variables
- Give an example of a function.
Function name (x, y){
Return (x * y) + y,
}
- What is a side effect?
A piece of coding that has some kind of impact.
A change to the internal state of the environment that impacts instructions that come after it.
- Give an example of a function that produces a side effect and another function that produces a value.
Let n = 6 produces a side effect
Console.log(math.min(6, 2) + 200);
Not really sure, thought they both must have at the same time.
- What is control flow?
The order in which the code is executed.
- What is conditional execution?
If this then that. There are more than one route that can be taken.
- What kind of keyword do you need to use to invoke conditional execution?
If