Terminologies

Variables related
let x; // declare x
x = 5; // assign 5 to x
x = 6; //re-assigning x
let x; //re-declaring x
let y = 5; // initialized x with 5 (variable definition)
Type Coercion or Implicit Conversion
This is the datatype conversion done by Javascript Engine
Ex -> 5+'5' = '55' // Here Js implicitly converting number 5 to string and concatinating
Type Casting or Explicit Conversion
This is the datatype conversion done by developer manually.
Ex -> 5 + Number('5') = 10 //Here we are explicitly converting the string '5' to a number.
Primitive Datatype or Basic
These values are stored in the stack memory and a copy of value is given to other variables. These are also called the literal values because they are literally values.
Referenced Datatype or Derived Datatype
These values are stored in the heap memory and original reference is given to other variables.
Autoboxing
When we use methods on literal values, then they are first temporarily converted into their respective object and then the method is applied.
Temporal Dead Zone
TDZ prevents the access before declaration of let and const variables.
Closure function
It remembers its lexical scope even when outer funciton execution has been finished.
Callback function
A function that is passed to another function as argument and will be called later.
Higher Order function
A function that takes another function as argument or returns a function.
Detached function
When a method is separated from its object, it looses its this binding.
Functional Composition
Combining multiple functions where output of one function become input for another function.
Factory Function
A function which returns a new object.
Event Loop
Mechanism that handles async execution in JS.
Pure functions
Immutability(Does not mutate input) and No side effect(Does not prevent outside state like accessing global variables , api calls and dom manipulation and log to console and using time-date functions)
Impure functions
Breaks one of the rule of pure functions.
Mutable
Which can be changed
Immutable
Which cannot be changed
Transforming Terminologies
What these all does on high level?
They all transform the data into some other format.
What is the difference in all if all transforms the data?
The difference is in the procedure of transforming and the purpose behind it.
Hashing
Why it matters?
-Because even if someone steals the database, he only gets the hashed password, not the actual one. Only the user knows the original password.
Purpose : Verify the data not recover. (Passwords)
Encryption
Q- Why it matters?
- Data is hidden and secured, but it can be recovered when needed. For Example - whatsapp messages. Message sent by user are encrypted and strored on the database and only the receiver can decrypt it.
Purpose : Secure the data and recover it later. (Whatsapp messages)
Encoding
Why it matters?
spaces breaks the url and & is treated as separater. Encoding fixes it by converting the space into + and & into %26 which keeps the original data safe.
Safe ka matlab ki original data hamara intact rahe, usme kuch kharabi na ho.
Purpose : Safe Transfer (Url encoded)
Serialization
Why it matters?
- Helps in storing or sending complex data.
Purpose : Preserve structure (JSON)
Hard and Soft delete
There are two ways to delete the user from our system:
Hard Delete
Erase the user record from the database. Recovery is not possible in Hard delete.
DELETE FROM users WHERE id = 10;
Soft Delete
Only mark the deleted column to true. Recovery of the data is possible.
UPDATE users SET is_deleted = 1 WHERE id = 10;
Compiled and Interpreted Language
Compiled Language
A compiled language is translated into machine code once, before execution.
Interpreted Language
An interpreted language is translated and executed line-by-line at runtime by an interpreter program.






