//let element = document.getElementId('elementId');
//let parentElement = element.parentElement;
const element = document.body; // element = <body>...</body>
const parentElement = element.parentElement; //parentElement = <html>...</html>
element = document.querySelector('a')
parentElement = element.parentNode;
const res = myelement.parentNode; // Returns parent node of myelement