Why can't you call a variable in JS "name"?
var wrapper = document.createElement("div");
var name = document.createElement("div");
wrapper.appendChild(name); // TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
document.body.appendChild(wrapper);
When I type "name" in the console in a new tab it returns an empty string?
I use Chrome.
name. Callingnamein the console is the same as accessing thenameproperty ofwindow.