I don't understand the output of this code :
var tab = [];
console.log(tab);
tab.push("Hello");
The console will display this :
[]
0: "Hello"
length: 1
__proto__: Array(0)
Why does it display "Hello" ?
Can someone explain to me ?
Thanks,
I don't understand the output of this code :
var tab = [];
console.log(tab);
tab.push("Hello");
The console will display this :
[]
0: "Hello"
length: 1
__proto__: Array(0)
Why does it display "Hello" ?
Can someone explain to me ?
Thanks,