Queryselector on getting the parent's child

I was trying to select one of the child of parent using array, but it didn’t work.

image

JS is not my thing but you are asking for the children of your child element and there are none.

e.g. there are no elements that match this:

ForChild(childselect[0]);

You would have needed another element in here:

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

Did you mean to do this instead:

ForChild(getchild[0]);

I think I was high when I did this. I don’t remember anything. I will see

1 Like

I figured it out