{"action":"opened","issue":{"url":"https://api.github.com/repos/ruanyf/es6tutorial/issues/766","repository_url":"https://api.github.com/repos/ruanyf/es6tutorial","labels_url":"https://api.github.com/repos/ruanyf/es6tutorial/issues/766/labels{/name}","comments_url":"https://api.github.com/repos/ruanyf/es6tutorial/issues/766/comments","events_url":"https://api.github.com/repos/ruanyf/es6tutorial/issues/766/events","html_url":"https://github.com/ruanyf/es6tutorial/issues/766","id":376289540,"node_id":"MDU6SXNzdWUzNzYyODk1NDA=","number":766,"title":"about super in class extends","user":{"login":"Rangocold","id":16416092,"node_id":"MDQ6VXNlcjE2NDE2MDky","avatar_url":"https://avatars2.githubusercontent.com/u/16416092?v=4","gravatar_id":"","url":"https://api.github.com/users/Rangocold","html_url":"https://github.com/Rangocold","followers_url":"https://api.github.com/users/Rangocold/followers","following_url":"https://api.github.com/users/Rangocold/following{/other_user}","gists_url":"https://api.github.com/users/Rangocold/gists{/gist_id}","starred_url":"https://api.github.com/users/Rangocold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rangocold/subscriptions","organizations_url":"https://api.github.com/users/Rangocold/orgs","repos_url":"https://api.github.com/users/Rangocold/repos","events_url":"https://api.github.com/users/Rangocold/events{/privacy}","received_events_url":"https://api.github.com/users/Rangocold/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-01T07:52:23Z","updated_at":"2018-11-01T07:52:23Z","closed_at":null,"author_association":"NONE","body":"class A {\r\n  constructor() {\r\n    this.x = 1;\r\n  }\r\n}\r\n\r\nclass B extends A {\r\n  constructor() {\r\n    super();\r\n    this.x = 2;\r\n    super.x = 3;\r\n    console.log(super.x); // undefined\r\n    console.log(this.x); // 3\r\n  }\r\n}\r\n\r\nlet b = new B();\r\n为什么super.x = 3的时候super就是当this来用\r\nconsole.log(super.x); 的时候，this就变成了A.prototype\r\n从代码上看，只是第一次对super对象进行写操作，第二次是对super对象进行读操作，是什么导致了这两次操作的实际对象不一样呢？能否详细说明写？\r\n感激不尽\r\n"}}
{"actor":{"display_login":"Rangocold"}}