cara memilih javascript elemen yang berdekatan

/* this is not idea but should work*/
const div1 = document.querySelector(id/class).parentElement;
const adjacentDiv = div1.previousSibling;

Grepp NewBie