-
-
Save LuisMDeveloper/aa04ce64616ebf2273140e828a5c620d to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/qinawi
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"> | |
| "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 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
| "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