my code is rather simple so I am surprised that I cannot find the error:

<div id="TreeBoxes" style="float:right;"></div>
<script type="text/javascript">
    var trees = new Array("Ambroňe","Borovice","Břízy",...,"Zmarličníky");
    var trees_sz = trees.length();
    for(count = 0; count < trees_sz; count++) {
        var txt = document.createTextNode(trees[count]);

The code just creates a bunch of text saying “undefined” instead of the contents of the trees variable.
The full code is running on this site:

Read more here: JavaString declared string array returning undefined


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: