Skip to content

Commit 237d4b1

Browse files
authored
stack and heap
1 parent c9d65d9 commit 237d4b1

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

01_basics/data_types_Summary.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const anotherId = Symbol('123')
2626

2727
console.log(id === anotherId);
2828

29-
const bigNumber = 345654355667889990282 n;
29+
//const bigNumber = 3456543556678 n;
3030

3131
// javascript is dynamically typed languageee
3232

@@ -46,4 +46,25 @@ const myfunction = function() {
4646

4747
console.log(typeof bigNumber);
4848
console.log(typeof outsideTemp);
49-
console.log(typeof myfunction);
49+
console.log(typeof myfunction);
50+
// ****************************************
51+
//Stack(Primitive) , Heap(Non- Primitive)
52+
53+
let myYoutubename = "sakshihanwatdotcom"
54+
55+
let anothername = myYoutubename
56+
anothername = "chaiaurcode"
57+
58+
console.log(myYoutubename);
59+
console.log(anothername);
60+
61+
let userOne = {
62+
email: "user@google.com",
63+
upi: "user@ybl"
64+
}
65+
let userTwo = userOne
66+
67+
userTwo.email = "sakshi2gamil.com"
68+
69+
console.log(userOne.email);
70+
console.log(userTwo.email);

0 commit comments

Comments
 (0)