You are on page 1of 3

variables ->var ,let,const

alert(abc)-> isme kuch bhi dalne se alert hota h page kholete hi


console.log(typeof x)-> isko hum data type dekhne k lie use karte h
null bhi ek object hi h
console.log(typeof String(a)); ->isme hum data type conversion kar skate h ase
how to access the strings

console.log(s[0]);,console.log(s[1]);
console.log(s.indexof("n"));-> ise hum find karne k lie n kis index p h ye use
karte h
console.log(s.charAt(11));-> isme konsa charchter h wo batata h
console.log(s.endWith("is gaurav"));-> ye check kar k batyega ki end k string m ye
part h ki nhi true or false
console.log(s.includes("abhi")) -> ye check karta h ki pure array m khai h ki
nhhi h
console.log(s.substring(3,4)-> ye isme 3 se chalu ho k 4index tak ki string daga ok

console.log(s.substr(3,4)-> isme pure 3 se chalu ho k length tak ki age ki string


dega

1,keyword vs word
2,let const ver
3,hosting-variable and funtion are hosited which means there
declariation is moved on the top of code
4,premitive- asi koi bhi value jisko copy karne par value real copy nhi
hoti balki us main value ka reference pass ho jata hai use hum reference value
khete h
5,reference - aur jiska copy karne per real coopy ho jayee wo value primitive value
hoti h
6,
7,arry -group of same values [1,2,3,4], pop ek nikalna end se ,push ek add karna
end se
,unshift shuru m value ko add karne k lie ,(shift) shuru ki ek valuee hat jate h
8,arr.splice(2,2) isme index number daal k waha se value ko kha tak hatani h wo
hata sakte h
9,object (ekk bande k bare m sare detail ya info hue to object in a key value
pair )
10,property or method (property m normal key pair ataa h kuch bhi )method m jiske
age function laga ho ok
11, browser contaxt api ()
12,window .>jisme js k sare feature hote h kam padne p use karta h ye
13,stack > jisme data jese books rakhte h phele jo ataa h wo subse last m
niklta h, fir jo last m ataa h subse phele wo niklta h
14,heap memomry > jab data ya intermideiate data jaha p store hota h
usko heap memo ry bolte h jese (1+2+3= 1+2=3 3+3= 6)
15, execution context >jab bhi fun called hota execution context
banta h jab bhi hum ek function bante h
ek imagenry box ban jatah jisme variables hote h or function hote
h or lexual environment hota h
16,lexual environment wo batata h ki apka function kya axeces kar
skata h kinko nhi ,mtlb its hold its scope and scope chain
17,spread operatior [...a] ye operatior copy karne k lie use hota h
(REFERENCE KO COPY KARNE K LIE USE KARTE H)
18,falsy values ye hai =0,false ,undefined null NaN document.all
19,truthy values ye sare hote h falsy value chod k
20,foreach loop sirf array pe chalte hai matlb ki jab bhi tumhare
pass ek arry ho, tab use main kaun ataa hai foreach loop
21,objects par loop karne ke lie hota hai forin loop
22callback >asee code jo baad me chalte hai use hum ek function dete
hai ke bhaiya jab complete hoajye to ye fuction jo hum date hao wpo
ek normal fun hi hote hai or use khate h callback fun
23first class fun, > js main ek concept matlb hota h ki app fun
ko use kar sakte as a value or variable ki thera use karskte h
24
25
26
27
28
dom
a) for Document manipulation
1 document. createElement(element)
2 document.removeChild(element)
3 document.appendChild(element)
4 document.replaceChild(new,old)
5 document.write(text)

b) for c=document manipulation


1 document.getElementsbyId(name)
1 document.getElementsbytagName(name)
2 document.getElementbyclassname(name)
3 document.getElementbyname(name)
4 document.querySelector(selector name)
5 document.querySelectorAll('selector name')
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

You might also like