javascript get every odd element

Solutions on MaxInterview for javascript get every odd element by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "javascript get every odd element"
Valentino
06 Nov 2020
1//you can use the css nth-child property like this:
2var second-child = document.querySeletorAll('[your element name]:nth-child(odd)');