Skip to content

Instantly share code, notes, and snippets.

@alexandermitsyk
Created May 3, 2019 10:02
Show Gist options
  • Save alexandermitsyk/a23a92e2b515f6e39db2bac67dd85e06 to your computer and use it in GitHub Desktop.
Save alexandermitsyk/a23a92e2b515f6e39db2bac67dd85e06 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/qojorew
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var numbers = [1, 2, 3];
var newNumbers = [].concat(numbers, [4]);
console.log(newNumbers);
var person = {
name: 'Sándor'
};
var newPerson = _extends({}, person, {
age: 27
});
console.log(newPerson);
var filter = function filter() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return args.filter(function (el) {
return el === 'Mitsyk';
});
};
console.log(filter('Mitsyk', 'Kovács', 'Biró'));
var NewNumbers = [1, 2, 3];
one = NewNumbers[0];
two = NewNumbers[1];
console.log(one, two);
</script>
<script id="jsbin-source-javascript" type="text/javascript">const numbers = [1,2,3];
const newNumbers = [...numbers,4];
console.log(newNumbers);
const person = {
name:'Sándor'
};
const newPerson = {
...person,
age: 27
};
console.log(newPerson);
const filter = (...args) => {
return args.filter(el => el === 'Mitsyk' );
}
console.log(filter('Mitsyk','Kovács','Biró'));
const NewNumbers = [1,2,3];
[one,two] = NewNumbers;
console.log(one,two);
</script></body>
</html>
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var numbers = [1, 2, 3];
var newNumbers = [].concat(numbers, [4]);
console.log(newNumbers);
var person = {
name: 'Sándor'
};
var newPerson = _extends({}, person, {
age: 27
});
console.log(newPerson);
var filter = function filter() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return args.filter(function (el) {
return el === 'Mitsyk';
});
};
console.log(filter('Mitsyk', 'Kovács', 'Biró'));
var NewNumbers = [1, 2, 3];
one = NewNumbers[0];
two = NewNumbers[1];
console.log(one, two);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment