ãã®æ¸ç±ã¯Creative Commons Attribution-NonCommercialã® ã©ã¤ã»ã³ã¹ ã§å ¬éããã¦ãã¾ãã ã¾ããPDFã¨ãã¦ã¬ã³ããªã³ã°ãããã¼ã¸ã§ã³ã¯ä»¥ä¸ãããã¦ã³ãã¼ããããã¨ãã§ãã¾ãã
æ¦è¦ å¾ ã¡ç¦ããã人ãå¤ããã¨ã ãããES2015ã®ä¸çªã®ç®çæ©è½ã¨ãè¨ããã¯ã©ã¹æ§æããã¤ãã«V8ã§ãµãã¼ããããã Classæ§æã¯ããé¢æ°ï¼ã³ã³ã¹ãã©ã¯ã¿ï¼å®ç¾©ãï¼ã.prototypeã¸ã®ã¡ã½ããå®ç¾©ãã®ç³è¡£æ§æã§ããã JSã§ä»ã¾ã§æ§ã ã«å·¥å¤«ããã¦ããã¯ã©ã¹ã®æ¸ãæ¹ãã綺éºã«çµ±ä¸ãã¦ãããå¯è½æ§ãç§ãã¦ããã ã¯ã©ã¹ãä½ã å¾æ¥ãCatã¯ã©ã¹ãä½ããã¨ããå ´åãã®ããã«æ¸ãã¦ããã function Cat(name) { this.name = name } Cat.prototype.meow = function () { alert( this.name + 'ã¯ãã£ãªã¨é³´ãã¾ãã' ) } ããããã®æ¸ãæ¹ã ã¨ã©ããã¦ããã³ã³ã¹ãã©ã¯ã¿ã¨ã¡ã½ããã®å®ç¾©ãåé¢ããã¦ãããããã¯ã©ã¹ã¨ãã¦ã¾ã¨ã¾ãããªãåããã¥ããæããã ã¡ã½ãããå¢ãã¦ããæããCat.prototyp
ç®æ¬¡ 2019å¹´è¿½è¨ ã¯ããã« ã¯ã©ã¹å®ç¾ã®ããã«å¿ è¦ãª JavaScript ã®è¨èªä»æ§ function this call new æ¼ç®å prototype ãã§ã¼ã³ ããããã£: prototype Google Closure æµã®ã¯ã©ã¹ã®å®ç¾æ¹æ³ã®æ¦è¦ ã¯ã©ã¹ã®å®£è¨ã¨ã³ã³ã¹ãã©ã¯ã¿ã®å®ç¾© ã¡ã³ãå¤æ° (ã¤ã³ã¹ã¿ã³ã¹å¤æ°) ã¡ã½ããå®ç¾©ã¨å¼ã³åºã private, protected ç¶æ¿ ãããã¿ã¤ããã§ã¼ã³ãå©ç¨ãã¦ã¡ã½ããã親ã¯ã©ã¹ããå¼ãç¶ã 親ã¯ã©ã¹ã®ã³ã³ã¹ãã©ã¯ã¿ã®å¼ã³åºã ã¡ã½ãããªã¼ãã¼ã©ã¤ãã¨è¦ªã¯ã©ã¹ã®ã¡ã½ããã®å¼ã³åºã å¤éç¶æ¿ abstract, interface inherits ã®å®éã®ã³ã¼ã è¯ããªãã¯ã©ã¹å®ç¾æ¹æ³ ES6 ã®ã¯ã©ã¹ 2019å¹´è¿½è¨ ãã®è¨äºã§ã¯classãå°å ¥ãããES6以åã®JavaScriptã§ã©ã®ããã«ã¯ã©ã¹ã«ç¸å½ãããã®ã
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}