Created
December 29, 2017 09:10
-
-
Save debugmodedotnet/25d712a0e653ef11972d4f21aa6b68cc 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 car = { | |
model: 'bmw', | |
color: 'red', | |
price: 2000 | |
} | |
Object.defineProperty(car, "type", { | |
writable: true, | |
enumerable: true, | |
configurable: false, | |
value: 'gas' | |
}); | |
console.log(car.type); //gas |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment