Created
August 3, 2016 04:33
-
-
Save anonymous/ddab3ccfa4b4b433636484ca7aa5b0ab to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/qinawi
This file contains 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"> | |
"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> |
This file contains 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
"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