I am unable to understand what is happening in the following code. first i create the object then console the object before modifying it. but instead it output the modified value.
<script>
var x={
"name" :"nauman",
"address":{
"add1":"home",
"add2": "home2"
}
}
console.log(x);// it log hom3 instead of home
x.address.add1="hom3";
console.log(x);
</script>