-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmemory.js
42 lines (34 loc) · 1.02 KB
/
memory.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// memory 2 type ki hoti he
// stack(premitive) , Heap(non- primitive)
// stack memory ki allocation aur deallocation fast hoti he
// heap memory ki allocation aur deallocation slow hoti he
// stack memory ki size fixed hoti he
// heap memory ki size dynamic hoti he
// stack memory ki allocation time constant hoti he
// heap memory ki allocation time variable hoti he
// stack memory ki deallocation time constant hoti he
// heap memory ki deallocation time variable hoti he
// stack memory ki use karna jaruri hota he
// heap memory ki use karna jaruri nahi hota he
// let myname='brajesh'
// anothername='raj rajput'
console.log(myname);
console.log(anothername);
let userOne ={
name:'brajesh',
age:25,
}
let userTwo = userOne
console.log(userOne);
console.log(userTwo);
// this is heap example
// heap me orignal velue me hi chenge hota he
// let userOne ={
// name:'brajesh',
// age:25,
// }
// let userTwo = userOne
userTwo.name='raj rajput'
console.log(userOne);
console.log(userTwo);
// end heap example