1. A fragment of code that produces a value.
2. Binding or variable is used to catch and hold values.
3. A collection of bindings and their values that exist at a given time.
4. A function is a module of code that accomplishes a specific task. A function usually takes certain data as input, processes the data, and returns the result.
5. This function takes the name of a coin as input and checks if @ivan is currently shilling it
function isShilling(coin) {
if (coin == "EOS") {
return true;
} else {
return false;
}
}
6. Showing a dialog box, writing text to the screen or a change to the internal state of the machine in a way that will affect the statements that come after it.
7.
function add(x, y) {
return x + y;
}
function addWithSideEffect(x, y) {
alert("This is a side effect");
return x + y;
}
8. Order in which statements are executed.
9. Decision point of the program based on certain conditions.
10. if