My-Own-Note-js
My-Own-Note-js
Destructring Object
It is to extract properties from an object and
assign to it
Exp-
Let a = {
Name:”Hello”,
Age: 18,
Hobbie: “Gaming”
}
Const {Name,Age} = a;
Callback
Arrow function
Closure
function parentFunction() {
let count = 0; // Parent scope variable
function childFunction() {
count++; // Access parent variable
console.log("Count is:", count);
}
return childFunction;
}
Hoisting
Hoisting javascriptile oru behaviour aanu, ithil
variable/function scopeinte topil move
cheyyapettath pole behave cheyyum. Functions
initialize cheyyunnathinu munpe access cheyyan
pattum. Pakshe, var variables undefined aayittu
initialize cheyyum, let and const variables access
cheyyumbol initializationinu munpe error varum
CALLSTACK
Callstack ennu parayunnath javascriptile
mechanism aanu ith function execute
cheyyunnath track cheyyan sahayikum
debouncing
debouncing ennu parayunnath multiple events
oru mich nadakaathe oru limit vech function
execute cheyyunnath aanu expl- multiple button
clicks etc
throttling
multiple events varumbo our specific time
intervalil function execute cheyyunath annu
throttling
Type Casting
Our data typine convert cheyyunna process annu
typecasting
2 type und
Implicit (Automatic data converstionn) type
coeration
Example-
let num = 10; // number
let str = "The number is ";
Entry-controlled loop
For loop
While loop= condion wrong avunnath vare loop
work avum
Exit-controlled loop
Do-while loop
Athyam loop work ayi avasaanam mathram
condition check cheyyukayullu
Memoization
Memoization ennu parayunnath our optimisation
technique aanu multiple function calls varumbo
result cache store akum pinne function vilikumbo
aah result aanu return cheyya
Pure Function:
A pure function is a function that satisfies the
following conditions:
Impure Function:
An impure function is a function that does not
satisfy one or both of the conditions of a pure
function. Specifically, impure functions may:
ASSEMPLY LANGUAGE
Assembly Language ennu parayunnathu oru low-
level programming language aanu, ithu machine
code (CPU instructions) um binary language um
near aanu. Assembly language direct aayi CPU-ile
hardware ne control cheyyan upayogikkunnu.
Ithu high-level languages (like C, Java, etc.) ennu
compared to more human-readable illa, pakshe
faster and efficient aanu.
BOXING
Boxing ennu parayunnathu:
Unboxing:
Boxing kazhinjathinu sesham, object back to
primitive value aayi unbox cheyyum.
Dynamic typic
Its is nammal our variable initialise or declare
cheyyumbo athinte data type paranju kodkanda
avishyam illa automatically manassilayilla