Demystifying JavaScript Terminology
Tags: react, beginners, javascript, programming
Published: 2023-08-09 12:21:54

Learn the terms that are highly used in javascript, and that would help you learn javascript better.

1. Syntax Parser: A Program that reads and determines what it does and if the grammar is valid. 
    
    
2. Lexical Environment: where something sits physically in the code you write. 
    
    
3. Execution Contexts: A wrapper to help the code that is running. 

1. Variable Environment: where the variables live and how they relate.

1. Scope: Where variables are available in your code. 
2. Callbacks: A callback is **a function passed as an argument to another function**. This technique allows a function to call another function. A callback function can run after another function has finished.
    
    
3. Asynchronous: two or more objects or events **not** existing or happening at the same time. 
    
    
4. Asynchronous Callback: Asynchronous programming is a technique that enables your program to start a potentially long-running task and still be able to be responsive to other events while that task runs, rather than having to wait until that task has finished.
    
    
    > **ELI5**:  
    Imagine you're playing with building blocks. You ask your friend to tell you when they're done building a tower. When they're finished, they'll shout "done!" That shout is like the asynchronous callback – your friend lets you know when they're done with their task, so you can continue playing without waiting for them.
    > 
    
5. Event Queue: The event queue is responsible for sending new functions to the stack for processing. It follows the queue data structure to maintain the correct sequence in which all operations should be sent for execution.

1. Types: Types help us understand and manage the different kinds of data we use in our code. Think of them as different categories for things.
    
    
2. Dynamic Typing:  Dynamic typing is a concept in programming where the data type of a variable is determined at runtime, while the program is running, rather than at the time of writing the code
    
    
3. Static Typing:  Static typing is a concept in programming where the data type of a variable is determined and explicitly declared at the time of writing the code, and it cannot change during runtime.
    
    
4. Primitive Types: A type of data that represents a single value.
5. 7 data types in Javascript: 
    1. Undefined 
    2. Null
    3. Boolean
    4. String: sequence of characters
    5. Number: Floating point number
    6. Symbol 
    7. BigInt

6. Operators: Take two parameters and return a single value;
7. Infix notation: Infix notation is the notation commonly used in arithmetical and logical formulae and statements.
8. Operator Precedence: which operator functions get called first?
9. Associativity: what order operator functions get called in left-to-right or right-to-left
10. Coercion: Converting a value from one type to another

1. First Class Functions: Everything you can do with other types, you can do with functions. 

1. Function Expression: A Function Expression works just like a function declaration or a function statement, the only difference is that a function name is NOT started in a function expression, that is, anonymous functions are created in function expressions. The function expressions run as soon as they are defined.

1. Function Statement: A Function Declaration( or a Function Statement) defines a function with the specified parameters without requiring a variable assignment. They exist on their own, i.e, they are standalone constructs and cannot be nested within a non-function block. A function is declared using the function keyword.
2. ****IIFE:**** IIFE (Immediately Invoked Function Expression) is a JavaScript function that runs as soon as it is defined.
3. ****Prototype:****  A JavaScript prototype is a shared set of properties and methods that objects can inherit from, serving as a blueprint for creating and interacting with objects.

> **ELI5**:
> 
> 
> Alright, imagine you have a special toy box that has all the rules for making other toy boxes. This special toy box is like the "prototype" in JavaScript.
> 
> Every time you want to make a new toy box that works just like the special one, you can use it as a guide. This means the new toy box will have the same features and abilities as the special toy box.
> 
> So, the special toy box is the "prototype" that shows other toy boxes how to be, and those other toy boxes are like objects in JavaScript that use the prototype's rules to work properly.
>