Skip to content

Conversation

@zdenko
Copy link
Collaborator

@zdenko zdenko commented Feb 25, 2018

Fixes error in the example for get and set keyword syntax in docs.

screen =
  width: 1200
  ratio: 16/9

Object.defineProperty screen, 'height',
  get: ->
    this.width / this.ratio
  set: (val) ->
    this.width = val * this.ratio

# this.height = 675

this.height = 900

# this.width = 1600

@GeoffreyBooth
Copy link
Collaborator

Ah. Yes. Thanks 😄

@GeoffreyBooth GeoffreyBooth merged commit 7542a75 into jashkenas:master Feb 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants