theObject=document;//or whatever object for (property in theObject) { console.log(`key= ${property} , value = ${theObject[property]}`) }