Created
October 22, 2018 17:21
-
-
Save mchelen/5eb90a91d327c9236191ba6242e8ff13 to your computer and use it in GitHub Desktop.
// source https://jsbin.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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"> | |
//jshint esnext:true | |
const arr1 = [ | |
'foo', | |
'bar', | |
]; | |
const arr2 = [ | |
'baz', | |
'fuzz', | |
]; | |
const arrMerge = [ ...arr1, ...arr2 ]; | |
console.log(arrMerge); | |
const obj1 = {a:1,b:2}; | |
const obj2 = {c:3}; | |
const objMerge = { ...obj1, ...obj2 }; | |
console.log(objMerge); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">//jshint esnext:true | |
const arr1 = [ | |
'foo', | |
'bar', | |
]; | |
const arr2 = [ | |
'baz', | |
'fuzz', | |
]; | |
const arrMerge = [ ...arr1, ...arr2 ]; | |
console.log(arrMerge); | |
const obj1 = {a:1,b:2}; | |
const obj2 = {c:3}; | |
const objMerge = { ...obj1, ...obj2 }; | |
console.log(objMerge); | |
</script></body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//jshint esnext:true | |
const arr1 = [ | |
'foo', | |
'bar', | |
]; | |
const arr2 = [ | |
'baz', | |
'fuzz', | |
]; | |
const arrMerge = [ ...arr1, ...arr2 ]; | |
console.log(arrMerge); | |
const obj1 = {a:1,b:2}; | |
const obj2 = {c:3}; | |
const objMerge = { ...obj1, ...obj2 }; | |
console.log(objMerge); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment