Last active
October 24, 2017 19:51
-
-
Save agatablue/c90d173f0120f3b3c806700acabca129 to your computer and use it in GitHub Desktop.
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
var A = { name: "a" }; | |
var B = { dev: true}; | |
//var C = Object.assign(A,B); | |
// taki zapis podmieni nam obiekt A | |
//dlatego, że pierwszy argument to źródło kopiowania wszystkich innych | |
//zatem zróbmy tak: | |
var C = Object.assign({}, A,B); // Obiekt C wygląda tak: {name: "a", dev: true} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment