msdsmd sm,dfsadfCourses Plus Student 1,013 Points
const child =document.createElement('span')// why can't I use div.createElement instead of document.createElement.
const child =document.createElement('span')// why can't I use 'div' instead of document
Jennifer NordellTreehouse Staff
Hi there, msdsmd sm,dfsadf! First, I'm assuming that
div was defined as a
Node element elsewhere. The
createElement() method is available on the
Document object but not on
The only list of those three that contains the
createElement() method is the
Hope this helps!