Exam CRT-600 Topic 7 Question 216 Discussion

Actual exam question for Salesforce's CRT-600 exam
Question #: 216
Topic #: 7
Refer to the HTML below:

Which JavaScript statement results in changing " The Lion."?

Suggested Answer: C Vote an answer

by Leopold at Dec 28, 2023, 08:04 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
anhnguyet23102002
2025-03-15 23:02:35
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.querySelector('$main li:second-child').innerHTML = ' Mr. T. ';

B. document.querySelector('$main li:nth-child(2)'),innerHTML = ' Mr. T. ';

C. document.querySelector('$main li.Tony').innerHTML = ' Mr. T. ';

D. document.querySelectorAll('$main $TONY').innerHTML = ' Mr. T. ';

B correct
upvoted 1 times
...
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10