Skip to content

Issue in Object Creation Section #204

@divyanshu-rawat

Description

@divyanshu-rawat

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

// 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions