- An expression can be defined as multiple definitions such as code that produces a value, written values, what is between parentheses and also a binary operator having two expressions + a unary operator applied to one.
- Binding is what is done is Javascript to catch and hold values. A special keyword such as let can indicate that the sentence will use the binding feature. There are typically 3 used binding keywords being let, var and const. Binding is possible to change as well by breaking the bindings with the equal sign(=), therefore letting another value be imputed.
- An environment is a collection of bindings and their values that exist at a given time. When communicating with a program on the computer, there will be bindings that are part of the standard language and most of the time with the surrounding system. An example of this would be a browser, when it starts up, there will already be code ready to activate with a loaded website.
- A function is a piece of program wrapped in a value. It is a block of code designed to perform a particular task. A function is known as a value which can be numbers, pieces of text, etc.
- A couples examples of functions are:
function avg(a,b) {}
and also
function square(x) {return x * x; }
- A side effect in Javascript is typically when a dialog box is shown or when text is written to the screen. Depending on how the code is written with the function being inputted and the following values being defined, different effects can be produced.
- A function that produces a side effect would show a dialog box or text written to the screen with this example of a function that produces a side effect:
prompt(" Enter passcode" );
.
Functions can also produce values, where to side effect is needed to be considered useful. An example is as follows:
console.log ( Math.max (2, 4)) ;
//-> 4
- Control Flow is when the action of executing statements in the form of a story, from top to bottom take place when multiple statements are present together.
- Conditional execution is used in a situation where different paths can be created, thus letting the program take the proper path, based on what is happening in the situation at hand.
- In order to call up the conditional execution, the keyword âifâ is needed. In this situation, separate code for both paths, upon execution will be present in order to create alternative execution paths. Another part of this includes the âelseâ keyword which will continue the paths in order to find the right solution in the situation.
I was getting stuck multiple times on this assignment and feel with coming back to it multiple times, my understanding has improved. I really want to understand all the key terms and have q-cards handy to help.
Edit @ivga80: You can use the preformatted text
when you want to show code in the post. Nice job.