Last active
May 7, 2021 21:48
-
-
Save TunvirRahman/62d8cc0a0e0199e51f883b2d52800bf9 to your computer and use it in GitHub Desktop.
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
| const someObject = { | |
| title: null, | |
| subTitle: "Subtitle", | |
| buttonColor: null, | |
| disabled: true | |
| }; | |
| function creteOption(someObject) { | |
| const newObject = Object.assign({ | |
| title: "Default Title", | |
| subTitle: "Default Subtitle", | |
| buttonColor: "blue", | |
| disabled: true | |
| },someObject) | |
| return newObject | |
| } | |
| console.log(creteOption(someObject)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment