1
votes

why do I get at the code below, the message: [object HTMLDivElement]. What am I doing wrong ? code

DO NOT post images of code, data, error messages, etc. - copy or type the text into the question. Please reserve the use of images for diagrams or demonstrating rendering bugs, things that are impossible to describe accurately via text. For more information please see the Meta FAQ entry Why not upload images of code/errors when asking a question? Please edit your question to include the text. - VLAZ
That's the default string representation for a <div> element. Elements don't have a meaningful .toString(). Instead of trying to use an element directly in a string like that, you'd use something like appendChild() on a containing element. - David