I have done the following:
a = {a:1};
b = {b:1};
c = [a,b]
delete a;
Now I don't understand why c still have two object : [a, b] but when I try to print a, console give me: Uncaught ReferenceError: a is not defined
Seems like object isn't exist anymore, but it still exist in the array.
I also tried to print:
typeof a //"undefined"
typeof c[0] //"object"
I was sure that when assigned an object to a variable it assigned by reference. Seems that here object has been copied?