【javascript】querySelectorAll で○番目の要素を取得する

querySelectorAllを使って、2番目の li を取得する。

document.querySelectorAll('li:nth-child(2)');

参考サイト