var el = document.getElementById('div-03');
var r1 = el.closest("#div-02");
// returns the closest parent element with the id=div-02
var closestElement = targetElement.closest(selectors);
// By Class (.)
var closestNextClass = document.getElementsByClassName('div-id-goes-here').closest(".div-class-here");
// By ID (#)
var closestNextId = document.getElementById('div-id-goes-here').closest("#div-class-here");