How can i return 2 values with getElementsByClassName()?
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;

&lt;div class="example"&gt;First div element with class="example".&lt;/div&gt;

&lt;div class="example"&gt;Second div element with class="example".&lt;/div&gt;

&lt;p&gt;Click the button to change the text of the first div element with class="example" (index 0).&lt;/p&gt;

&lt;button onclick="myFunction()"&gt;Try it&lt;/button&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The getElementsByClassName() method is not supported in Internet Explorer 8 and earlier versions.&lt;/p&gt;

&lt;script&gt;
function myFunction() {
    var x = document.getElementsByClassName("example");
    x[0].innerHTML = "Hello World!";
}
&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Link for example: <a href="http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_document_getelementsbyclassname" rel="nofollow">http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_document_getelementsbyclassname</a></p>

<p>This example show us how to change first div to "hello world". I wanna learn <strong>how can i change all classes to "Hello world"</strong>. I tried to change <code>x[0].innerHTML = "Hello World!";</code> to <code>x[*].innerHTML = "Hello World!";</code> but nothing happened. Any idea? :/</p>