I know I'm probably not answering the question but, this just shows it in the DOM instead of the console.
If you want an ordered list just change the <ul> (opening and closing tags) to <ol>
<!DOCTYPE html>
<head>
<title>Document</title>
</head>
<body>
<div class="output"></div>
<script>
const data = {
Jack: 2,
Olive: 1,
Harry: 2
};
const entries = Object.entries(data);
let output = '<h1> Output </h1>';
entries.forEach(([key, value]) => {
output += `<ul>
<li> ${key} = ${value} </li>
</ul>`;
document.querySelector('.output').innerHTML = output;
});
</script>
</body>
</html>