DEV Community

Neetesh Khanal
Neetesh Khanal

Posted on

How can i select my nth-child in javascipt DOM ?



My Website
<h1>Hello</h1>

<input type="checkbox">

<button style=":active color:red;">Click Me</button>

<ul>
  <li class="list">
    <a href="https://www.google.com">Google</a>
  </li>
  <li class="list">Second</li>
  <li class="list">Third</li>
</ul>

I want to select the list third and replace it with my Name.

Top comments (0)