<html>
<body>
<p>The spread operator is often used to extract only what's needed from an array:</p>
<p id="demo"></p>
<p id="demo2"></p>
<p id="demo3"></p>
<script>
const numbers = [1, 2, 3, 4, 5, 6];
const [one, two, rest] = numbers;
document.getElementById("demo").innerHTML = one;
document.getElementById("demo2").innerHTML = two;
document.getElementById("demo3").innerHTML = rest;
</script>
</body>
</html>