xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
const person = {
name : 'Max'
};
const newPerson = {
...person,
gender : 'female'
};
console.log(newPerson);
const filter = (...what) => {
return what.filter(el => el === 1)
};
console.log(filter(1, 2, 3, 1));
</script>
<script id="jsbin-source-javascript" type="text/javascript">const person = {
name : 'Max'
};
const newPerson = {
...person,
gender : 'female'
};
console.log(newPerson);
const filter = (...what) => {
return what.filter(el => el === 1)
};
console.log(filter(1, 2, 3, 1));</script></body>
</html>