Created
December 10, 2014 20:48
-
-
Save devdays/873836b760cdf3e5cd56 to your computer and use it in GitHub Desktop.
Object JavaScript - ECMAScript 6 Object.Assign
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
// Mreges one object into another | |
class Point { | |
constructor(x, y) { | |
Object.assign(this, { x, y }); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment