An expression is a fragment of code that produces a value. Multiple expression can have multiple functions which means once combined, it allows for complex computations within a program to occur.
Binding, in a way, is an internal memory system for the computer which logs the value/purpose of pieces of code. Binding allows a program to have an âinternal stateâ which the foundational basis upon which the programâs code is written. Once a binding has been defined, it can be used as an expression later on.
âEnvironmentâ is a term given to a collection of bindings and their values that exist at a given time. For example, when you load up a website there are functions that are existing in order to make the website accessible, interactive, animated etc. - these bindings and their values will be called the âenvironmentâ.
A function, in its rudimentary form, is wrapped code that can be called, invoked or applied to perform a certain action.
The function: âpromptâ can be called forth in a web browser to display a notification box.
A side effect is basically a change in a programs state caused by an expression or a function call.
A function that produces side effect:
console.log(firstAccount);
A function that produces value:
var firstAccount = accounts[0];
Control flow is the term used to describe the way in which the computer reads code - which is in a top to bottom ordered fashion. As story a story is structure with a beginning, middle and end - so is code.
Even though the control flow reads and executes code in an ordered fashion, a conditional execution will only be executed if a certain condition holds.
âIfâ or âelseâ