Question: I need to select every other div element inside a section element with the id attribute of view 1 . Which selector do I

I need to select every other div element inside a section element with the id attribute of "view1".
Which selector do I need?
document.querySelectorAll('#view1 div:nth-of-type(2n)')
document.querySelectorAll('div:nth-child(2)')
document.querySelectorAll('view1 div:nth-child(2)')
document.querySelector('#view1 div:nth-of-type(2n)')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!