addyosmani / addyosmani/essential-js-design-patterns

Issue in Object Creation Section

Open
#204 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
HTML
Stars
4.9k
Forks
804
PR merge metrics
No merged PRs in 30d

Description

There are four ways in which keys and values can then be assigned to an object.
Here in 4th case I am encountering a problem when I console the newObject then it returns an empty object but why so ?
I am using node v7.3.0

```javascript

// 4. Object.defineProperties

// Set properties
Object.defineProperties( newObject, {

"someKey": {
value: "Hello World",
writable: true
},

"anotherKey": {
value: "Foo bar",
writable: false
}

});

```
![screenshot from 2017-01-07 17 08 16](https://cloud.githubusercontent.com/assets/13464678/21741454/2acf7f0e-d4fc-11e6-8619-8e79ab7ff37a.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.