ã¡ãã£ã¨ããã£ãã®ã§ã¡ã¢ã ä¾ãã° alert(A); function A() { } ã¯ã§ãããã alert(A); class A { } ãã§ããªãã®ã¯ãªããã class A { } class B extends A { } ä¾ãã°ããã®ãããªã³ã¼ãã®å ´åãhoistingï¼ã¹ã³ã¼ãå 端ã¸ã®å·»ãä¸ãï¼ããã¦ãåé¡ãªããã é¢æ°ã¨éã£ã¦extendsã¯ãã®å ´ã§è©ä¾¡ããªããã°ãããªããã¨ãããã ä¾ãã°ã var A = function () { }; A.prototype.x = function () { return 1; }; class B extends A { } alert(new B().x()); ã¨ããã³ã¼ãã®å ´åãBã¯ã©ã¹ã¯Aãç¶æ¿ããªããã°ãããªãã®ã§ãvar Aã§å®£è¨ããã¦ãããã®ã¯hoistingãããªãã®ã§class宣è¨ããã®å ´ã§è©ä¾¡ããªãã¨ã
{{#tags}}- {{label}}
{{/tags}}