Skip to content

Instantly share code, notes, and snippets.

Created August 3, 2016 04:33
Show Gist options
  • Save anonymous/ddab3ccfa4b4b433636484ca7aa5b0ab to your computer and use it in GitHub Desktop.
Save anonymous/ddab3ccfa4b4b433636484ca7aa5b0ab to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/qinawi
<!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";
console.log(1, 2, 3);
console.log.apply(console, [4, 5, 6]);
var first = [1, 2, 3];
var second = [4, 5, 6];
first.push.apply(first, second);
console.log(first);
function addThreeThings(a, b, c) {
var result = a + b + c;
console.log(result);
}
addThreeThings.apply(undefined, first);
addThreeThings.apply(undefined, second);
</script>
<script id="jsbin-source-javascript" type="text/javascript">console.log(1,2,3);
console.log(...[4,5,6]);
let first = [1,2,3];
let second = [4,5,6];
first.push(...second);
console.log(first);
function addThreeThings(a,b,c) {
let result = a+b+c;
console.log(result);
}
addThreeThings(...first);
addThreeThings(...second);
</script></body>
</html>
"use strict";
console.log(1, 2, 3);
console.log.apply(console, [4, 5, 6]);
var first = [1, 2, 3];
var second = [4, 5, 6];
first.push.apply(first, second);
console.log(first);
function addThreeThings(a, b, c) {
var result = a + b + c;
console.log(result);
}
addThreeThings.apply(undefined, first);
addThreeThings.apply(undefined, second);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment