topic description
sources of topics and their own ideas
related codes
/ / Please paste the code text below (do not replace the code with pictures)
var obj = {a:1};
function fun (obj){
obj = {a:2}
}
fun(obj)
console.log(obj)
what result do you expect? What is the error message actually seen?
Why is the output {avl 1}? Shouldn"t the obj in the
function be promoted as a global variable without a var declaration?