- What is an expression?
Any fragment of code that produces a value is an expression. - What is a binding?
A binding occurs when a variable, constant, or let command is given a variable to hold. - What is an environment?
The environment is the set of binding present in the current coding window. - What is a function?
Something that can be called, executed, or applied and which is wrapped in a value to show some determinant use case. - Give an example of a function.
alert(“Welcome to my Webiste!”) - What is a side effect?
Side effects occur when a function creates a value that changes either the environment in the console, or the internal system workings. - Give an example of a function that produces a side effect and another function that produces a value.
var num = 5;
{
if num >1 = return 1;
else num <1 = return 0;
}
func();
8. What is control flow?
The pathway in which a program follows depending on if/else statements.
9. What is conditional execution?
A series of if/else statements put together in combination to create a number of different pathways the program can execute on.
10. What kind of keyword do you need to use to invoke conditional execution?
if/else statements.