'use strict';
{
const scores = {
math: 80,
english: 90,
};
const entries = Object.entries(scores);
entries.forEach((prop) =>{
//console.log(prop);
console.log(`${prop[0]}: ${prop[1]}`);
});
}
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My JavaScript</title>
</head>
<body>
<script src="main.js"></script>
</body>
</html>