code: function getAllAncestors(el, ancestors = []) {
      const nextAncestor = el.parentNode;
  
      if (!nextAncestor) {
          return ancestors;
      }
  
      ancestors.push(nextAncestor);
  
      return getAllAncestors(nextAncestor, ancestors);
  }
docs: recursive function to get all ancestor nodes of given element