///////////////stack and heap memory in js////////////////////
//// STACK MEMORY(PRIMITIVE USED )
let myYotubename ="hitensh"
let anothername = myYotubename //value assinged
anothername="chaiorcode"//value updates
/// copy is returning
console.log(myYotubename);//hitensh
console.log(anothername);//chaiorcode
//////// HEAP (NON PRIMITIVE USED)
let UserOne = {
email: "oldgmail.com",
upi: "user@ybl"
}
let UserTwo = UserOne
UserTwo.email ="new22gmail.com"
console.log(UserOne.email); /// new22gmail.com
console.log(UserTwo.email);/// new22gmail.com