let child = document.querySelector('.child'); let parent = child.closest('.parrent'); console.log(parent);