Before you write the code in JS

BSc CSIT Graduate
Here’s a simple fact:
Programming is all about:
What we should do with what?
a. Data (numbers, text, true/false…)
b. Processing (loops, functions, etc.)
Let's talk about terminologies:
Data type: Data types are like labels that tell the computer what kind of value a variable holds. They define
a. What kind of data can be stored (numbers, text, true/false, etc.)
b. What operations can be done on that dataContext: It is the environment in which a piece of code runs. It consist of :
a. execution thread and
b. memoryGlobal Context: This is the default context when code runs outside any function. In browsers, this in global context refers to the window object. Variables and functions declared globally belong to this context.
Local Context: When code runs inside a function, it has a local context.
Execution Thread : An execution thread is the part of the JavaScript engine that runs your code line by line. It is like the “worker” that executes instructions in your program.
Main thread and local exectuion thread are it's type.. based on the context.Call stack: It is a structure in js that keeps track of funcitons. When function is encountered by exectuion thread(main thread), it pushes the function in to the stack. This call stack works in LIFO manner. After the execution function is popped out.




