The following statement gives me the first element with the class titanic
element = document.querySelector('.titanic');
How would I retrieve the second element with the same class?
Use document.querySelectorAll
document.querySelectorAll
document.querySelectorAll('.titanic')[1]
1.4m articles
1.4m replys
5 comments
57.0k users