ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 79 - Certified JavaScript Developer I discussion

Report
Export

Refer to the HTML below:

<div id="main">

<ul>

<li>Leo</li>

<li>Tony</li>

<li>Tiger</li>

</ul>

</div>

Which JavaScript statement results in changing " Tony" to "Mr. T."?

A.
document.querySelectorAll('$main ONY').innerHTML = ' Mr. T. ';
Answers
A.
document.querySelectorAll('$main ONY').innerHTML = ' Mr. T. ';
B.
document.querySelector('$main li:second-child').innerHTML = ' Mr. T. ';
Answers
B.
document.querySelector('$main li:second-child').innerHTML = ' Mr. T. ';
C.
document.querySelector('$main li.Tony').innerHTML = ' Mr. T. ';
Answers
C.
document.querySelector('$main li.Tony').innerHTML = ' Mr. T. ';
D.
document.querySelector('$main li:nth-child(2)'),innerHTML = ' Mr. T. ';
Answers
D.
document.querySelector('$main li:nth-child(2)'),innerHTML = ' Mr. T. ';
Suggested answer: D
asked 23/09/2024
Renaldo Williams
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first