<!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>
main.js
'use strict';
{
const moreScores = {
shiro: 77,
goro: 88,
};
const scores = {
taro: 80,
jiro: 70,
saburo: 90,
...moreScores,
};
// const {taro, jiro, saburo} = scores;
const {taro, ...others} = scores;
console.log(taro);
// console.log(jiro);
// console.log(saburo);
console.log(others);
}