// document.getElementsByClassName("first")[1].getElementsByClassName("second")[2]; document.querySelector('.first:nth-of-type(2) .second:nth-of-type(3)').style = 'border: 1px solid red;'