SHARE
TWEET

Untitled

a guest Jun 19th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.   <meta charset="utf-8">
  5.   <meta name="viewport" content="width=device-width">
  6.   <title>JS Bin</title>
  7. </head>
  8. <body>
  9.  
  10. <script id="jsbin-javascript">
  11. 'use strict';
  12.  
  13. 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; };
  14.  
  15. var numbers = [1, 2, 3];
  16. var newNumbers = [].concat(numbers, [4]);
  17.  
  18. console.log(newNumbers);
  19.  
  20. var person = {
  21.   name: 'Max'
  22. };
  23.  
  24. var newPerson = _extends({}, person, {
  25.   age: 57
  26. });
  27.  
  28. console.log(newPerson);
  29. </script>
  30.  
  31.  
  32.  
  33. <script id="jsbin-source-javascript" type="text/javascript">const numbers = [1, 2, 3];
  34. const newNumbers = [...numbers, 4];
  35.  
  36. console.log(newNumbers);
  37.  
  38. const person = {
  39.   name: 'Max'
  40. };
  41.  
  42. const newPerson = {
  43.   ...person,
  44.   age:57
  45. };
  46.  
  47. console.log(newPerson);</script></body>
  48. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top