The community is working on translating this tutorial into German, but it seems that no one has started the translation process for this article yet. If you can help us, then please click "More info".
If you are fluent in German, then please help us - just point to any untranslated element (highlighted with a yellow left border - remember that images should have their titles translated as well!) inside the article and click the translation button to get started. Or have a look at the current translation status for the German language.
If you see a translation that you think looks wrong, then please consult the original article to make sure and then use the vote button to let us know about it.
Please help us by translating the following metadata for the article/chapter, if they are not already translated.
If you are not satisfied with the translation of a specific metadata item, you may vote it down - when it reaches a certain negative threshold, it will be removed. Please only submit an altered translation of a metadata item if you have good reasons to do so!
The toArray() and makeArray() methods
The toArray() method
var arrayOfNames = $("ul#toArrayTest li").toArray();
for(var i = 0; i < arrayOfNames.length; i++)
$("ul#toArrayTest").append("<li>" + arrayOfNames[i].innerText + "</li>");
As you can see, once we have the arrayOfNames, we call the reverse() method on it. Then we loop through it and append each name to the source list, but this time in the reverse order. All of this is basically just to show you how easy it is to use the toArray() method!
The makeArray() method
<li class="testItem">John Doe</li>
<li class="testItem">Jane Doe</li>
<li class="testItem">Joe Doe</li>
var arrayOfItems = $.makeArray(document.getElementsByClassName("testItem"));
for(var i = 0; i < arrayOfItems.length; i++)
$("ul#makeArrayTest").append("<li>" + arrayOfItems[i].innerText + "</li>");