Truthy and Falsy
🟢All number is truthy other then 0. 🟢All string is truthy other then empty string. 🟢Empty Array and Empty String both are Truthy.
🔴Undefined, Null, and NaN (Not a Number) values are false. 🔴If variable set by false, it is falsy.
Undefined VS Null
Undefined is Negative or falsy
Null means not exists
🟢Value is not set. 🟢If function is not return or return but not said what is returned. 🟢If parameter is not pass. 🟢If property is not set in object 🟢If value is set undefined
Double equal (==) vs Triple equal (===)
Double equal (==) just check value. Triple equal (===) check value and type.
If you call/return one function from another function, it will create a close environment. Then if you return/use second or inner function it will create close environment and keep external variable reference.
Propagating an event from the lowest to the upward. When any event happed on an element, first of all it runs the handlers on it. Then it runs its parent. Then it run all the way up on other ancestors.
Recursive vs Iteration function
Recursive Function: If any function is called itself this is called recursive function.
When a function passed to another function as a parameter is called callback function. A callback function can run after another function has finished.
Get vs Post
Get: Get means data get. It send data by url. Its limit is 2048 character.
Post: For to submission data server send a request its post. Normally all request send in body. It has no limit.