Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.