What is an expression?
Using values and operators to get a result. Ex 1 + 2 in a expression that gives value
What is a binding?
Using let creates a binding that catches and hold a binding.
Ex. Let ten= 10;
Console.log(ten * ten)
Where let gives the binding with the name of ten the value of 10 using the = operator. Using let makes the binding so that we can use the expression more than once, it will not disappear after being used the first time. But will change if we change the let binding. Binding are the strings that grabs the values inside the bag. Can also use var and const to create bindings.
What is an environment?
The collection of all the bindings and values in a program is called the invironment
What is a function?
A piece of a program wrapped in values. This program can be used to run the wrapped program. Executing a function is called invoking, calling, or applying it. You can call a function by putting parentheses after an expression that produces a function value. Values given to functions are called arguments.
Give an example of a function.
Ex. Using prompt alert to show a pop up to the user, this uses a function to make it show up
What is a side effect?
Writing text or show a dialog box creates side effects
Give an example of a function that produces a side effect and another function that produces a value.
Var name= “Anders”;
Const greeting= “Hey!”;
Console.log (greeting + name);
//à Hey! Anders
Let one= 1 , two= 2;
Console.log (one, two);
What is control flow?
When program has more than one statement, they are executed like a story from top to bottom.
What is conditional execution?
If statement used when there`s a choice being made. A condition must be fulfilled to give a specific value. Ex. Only show numbers, not text.
What kind of keyword do you need to use to invoke conditional execution?