This is the javascript code.
var option={
value:'',
desc:{
en:'',
hn:''
}
};
option.value='15';
option.desc.en='hello';
option.desc.hn='world';
console.log(option);
option.value='25';
option.desc.hn='India';
console.log(option);
This gives the output-
object {value:25,object {desc:{en:"hello",hn:"India"}}}
object {value:25,object {desc:{en:"hello",hn:"India"}}}
Instead of
object {value:15,object {desc:{en:"hello",hn:"world"}}}
object {value:25,object {desc:{en:"hello",hn:"India"}}}