JavaScript loop querySelectorAll results