I'm trying to learn and understand javascript.
what is wrong with the following code?
var d=[];
d[0]=document.createElement('div');
d[0].title=document.createElement('div');
d[0].appendChild(d[0].title);
I get this error: TypeError: Argument 1 of Node.appendChild is not an object.
Can you suggest a solution?