×
×
Correct!

Change the text of the first element that has the class name "test".

<p class="test"></p> <p class="test"></p> <script> document.getElementsByClassName("test")[0].innerHTML = "Hello"; </script>
<p class="test"></p> <p class="test"></p> <script> document.getElementsByClassName("test")[0].innerText = "Hello"; </script>
<p class="test"></p> <p class="test"></p> <script> document.getElementsByClassName('test')[0].innerHTML = "Hello"; </script>
<p class="test"></p> <p class="test"></p> <script> document.getElementsByClassName('test')[0].innerText = "Hello"; </script>

Not Correct

Click here to try again.

Correct!

<p class="test"></p>
<p class="test"></p>

<script>
 = "Hello";
</script>

  
  
  




×

Reset the Score?

This will reset the score of ALL 67 exercises.

Are you sure you want to continue?



×

Congratulations!

You have finished all 67 JS exercises.

Share your score:



Get Certified!

Take our JavaScript Developer Certificate to prove that you have fundamental knowledge of web development using JavaScript.