An environment of your program

When a program starts, it’s being executed in a given environment.

  • The word environment can be simplified to mean a space in which your program live.
    • The environment holds things such as your defined variables (The bindings you made)
    • Or other things that were defined by JS itself.

Control flow

Control flow in JavaScript refers to the order in which statements are executed based on certain conditions and decision-making. It allows you to control the flow of program execution, enabling you to make decisions, loop through code blocks, and execute code selectively based on conditions. Manipulating the flow of your program you will have to use one of the below:

  • Conditional statement
    • If, if Else
  • Loops
    • for, while,
  • Control Statements:
    • (break, continue)