Created
September 3, 2019 10:13
-
-
Save moiz-frost/0982a523299d3baad70b13f1a6c07b37 to your computer and use it in GitHub Desktop.
Printing car object properties
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
console.log(Object.getOwnPropertyDescriptors(car)); | |
// Output | |
/*{ year: | |
{ value: '2010', | |
writable: true, | |
enumerable: true, | |
configurable: true }, | |
make: | |
{ value: 'Honda', | |
writable: true, | |
enumerable: true, | |
configurable: true }, | |
color: | |
{ value: 'White', | |
writable: true, | |
enumerable: true, | |
configurable: true }, | |
transmission: | |
{ value: 'Manual', | |
writable: true, | |
enumerable: true, | |
configurable: true }, | |
horsePower: | |
{ value: 140, | |
writable: true, | |
enumerable: true, | |
configurable: true }, | |
topSpeed: | |
{ value: 120, | |
writable: true, | |
enumerable: true, | |
configurable: true } }*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment