Let us consider an example
var a = {}
c = a
var a = {'abc':12}
var b = 10;
console.log(c)
So my understanding of hoisting is that in the creation phase of execution context a being undefined. But in the next line a is assigned to {} and so is c. When it goes to the next line a is assigned the object {'abc':12} . I have read that objects are assigned by reference. Then why does c not refer the new object instead of {}.