teratailã«æ稿ããã質åã®ä¸ã«ã¯ãã¹ã ã¼ãºã«åçãå¾ã¦è§£æ±ºã§ãã¦ããã±ã¼ã¹ã¨ããã§ãªãã±ã¼ã¹ãããã¾ãã 解決ãããªã質åã¯ãåçãã¤ããæ¾ç½®ããã¦ãã¾ã£ã¦ããããä»ã®ã¦ã¼ã¶ã¼ããææãããããããã¨ãå°ãªãããã¾ããã ãããã£ã質åã®ä¸ã«ãã質åã®ä»æ¹ãå¤ãããã¨ã§è§£æ±ºããå¯è½æ§ããããã®ãå¤ãåå¨ãã¾ãã å°ãã§ãå¤ãã®æ¹ã«åé¡ã解決ãã¦ããã ãçºã«ã質åãããæã®ãã³ããã¾ã¨ãã¾ããã ãã ããããã¯æ±ºãã¦ããã«æ¸ããã¦ãããã¨ãå®ã£ã¦ããªã質åè ã責ããããã®ãã®ã§ã¯ããã¾ããã ãã®ãã³ãã¯ã質åã®ä»æ¹ã®ã³ããã¾ã æ´ãã¦ããªãæ¹ã«å¯¾ãã¦ããã®ãã¤ã³ããæ¼ããã質åã«ããã°ãã£ã¨è¯ãã³ãã¥ãã±ã¼ã·ã§ã³ã«ãªããã¨ããã¢ããã¤ã¹ãããããã®ãã®ã§ãã 質åã®ä»æ¹ãããããªãæããåçãæ¥ãªãæã«åèã«ãã¦ã¿ã¦ãã ããã â»ä»¥ä¸ã®å 容ã¯ã主ã«ãQ&Aãã®è³ªåãããã¨ãã®ãã³ãã¨
JavaScriptã§ãã使ãããã³ã¼ãçã«å³æé¢æ°ã¨ãããã®ãããã¾ããç¡åé¢æ°ã宣è¨ãã¦å³å®è¡ãããã¨ã§ããããã¯ã¹ã³ã¼ãã®åå¨ããªãJavaScriptã«ããã¦æ¬ä¼¼çã«ãããã¯ã¹ã³ã¼ããåç¾ãã¾ãã var a = "global"; (function(){ var a = "local"; alert(a); //local })(); alert(a); //global ä¸çªæåãªã®ã¯ãã®(function(){ ... })()ã®å½¢å¼ãªã®ã§ããããªãfunctionã®å¤å´ã«ã«ãã³ãå¿ è¦ãªã®ãä¸æè°ã«æã£ããã¨ã¯ãªãã§ããããï¼ããããã«function(){ ... }()ã¨æ¸ãã¦ã¿ãã¨ãSyntax Errorãçºçãã¾ãã ãªãfunction(){ ... }()ã¯Syntax Errorãªã®ã JavaScriptã«ã¯functionæã¨functionå¼ããã£ã¦ã
Qiitaã§èµ·ããã¡ãã£ã¨ããé¨ãã«ã¤ãã¦ãäºæ ãç¥ããªã人ãã¡ãæ··ä¹±ãã¦ããã¿ããã èªåãç¥ã£ã¦ããç¯å²ã§ãä½ããã£ãã®ããæ¸ãã¦ãããã¨ã«ããã� ç»å ´äººç©ã«ã¤ãã¦ã¯ãå ·ä½åãåºãã¨è¿·æãã¨æãã®ã§ãã¹ã¦ä¼ããã ç¥ããããã°èª¿ã¹ãã°åããã¨æãã ã¡ãã£ã¨åã®è©±ä½ã¶æãããåã ã£ãããQiitaã§ã¡ãã£ã¨ï¿½è©±é¡ã«ãªã£ãæ稿ããã£ãã Swiftã«ã¤ãã¦ã®è©±ã ã£ãããWWDC2014ããã¯å¾ã®è©±ã ãã®æ稿ãããã®ãä»åã®é¨ãã®ä¸å¿äººç©ãååãè¨ã£ã¦ã¯ãããªããã®äººã以ä¸Kã¨ããã ã§ãä½ã話é¡ã ã£ããã£ã¦ããã®ãããåéã®ããã¹ãã§ããã£ã½ãæ¸ãã¦ãããã ãã©ï¿½å 容ã¯ï¿½(ã¨ãããã¿ã¤ãã«ãããã¦)ãã¿ã©ã¡ã ã§ããã®ãããåéã§ããã£ã½ãæ¸ããã¦ããã¨ä¿¡ãã¦ãã¾ã人ãããããã ã£ãã ã³ã¡ã³ãæ¬ã«ã¯æ£ããææããã人ããããã ãã©ãKã¯å¦å®çãªææ(客観çã«è¦ã¦æ£ããææãªã®ã ã)
è¿å¹´ããã¤ã¹ããã¯ãªã¹ãã¼ããã©ã³ãé«å質ãªãããã¯ã¼ã¯ãæ®åããããã«ããã¢ãã¤ã«ã²ã¼ã ã®å¶ä½ææ³ããããåãå·»ãç°å¢ãå¤åãã¦ãã¾ãããã¹ã¯ã¦ã§ã¢ã»ã¨ããã¯ã¹ã§ã¯ããã®ãããªç°å¢ã®å¤åã«å¯¾ãã¦ãæ¥ã æ°ããªãã£ã¬ã³ã¸ããç¶ãã¦ãã¾ããããã¦ããã®ãããªã¹ãã¼ãæ溢ããæ¥çã®æµãã«ã¯ãä¼ç¤¾ã®æ ãè¶ ããæè¡æ å ±ã®å ±æã交æµãæ¬ ãããªãã¨æãã¦ããã¾ãã ããã§ãã®å¤ã社å ã®ã¨ã³ã¸ãã¢ã»ãã¯ãã«ã«ãã£ã¬ã¯ã¿ã¼ã«ããææ°ã®ã¢ãã¤ã«éçºã®æè¡æ å ±ã社å ã¢ãã¤ã«ã¨ã³ã¸ã³ãéçºç§è©±ã«ããã»ãã·ã§ã³ãã¡ã¤ã³ã«ãã¹ã¯ã¦ã§ã¢ã»ã¨ããã¯ã¹ ã¢ãã¤ã« ãªã¼ãã³ã«ã³ãã¡ã¬ã³ã¹ãéå¬ããéã³ã¨ãªãã¾ãããã¾ããã»ãã·ã§ã³ã®å¾ã¯ç»å£ããå¼ç¤¾ã¹ã¿ããã¨ç´æ¥ãã£ã¹ã«ãã·ã§ã³ãããªã¼ãã¼ã¯ãã§ããå ´ãè¨ãã¦ããã¾ãããã®æ©ä¼ã«ã¹ã¯ã¦ã§ã¢ã»ã¨ããã¯ã¹ã¨ããä¼ç¤¾ã«ã¤ãã¦ãããã詳ããç¥ã£ã¦é ããã°å¹¸ãã§ãã ããã¼ã¸ã£ã¼ã»ãã¯
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? æè¿ããã¾ãããã°ã©ãã³ã°ãå¾æã§ãªã人ã®ãµãã¼ããããå½¢ã§ãé·ãæéã«ããã£ã¦ãã¢ããã°ã©ãã³ã°ãè¡ã£ã¦ããããã®ãªãã§ãæ°ãã¤ããæªãç¿æ £ã¨æé·ããããã®è¯ãç¿æ £ã¨ãããã®ãã¾ã¨ãã¦ã¿ãã ãã®è¨äºã®ããã¯ã°ã©ã¦ã³ãã¨ãªãä½ç³»çç¥èãæ¬ã«ãªãã¾ããã ã¨ã³ã¸ãã¢ãªã³ã°çµç¹è«ã¸ã®æå¾ ï½ä¸ç¢ºå®æ§ã«åãåãæèã¨çµç¹ã®ãªãã¡ã¯ã¿ãªã³ã° ãããã¦èªã¿ãã çµå¶è ãã¤ã³ãã足ããªãï¼vs. ç¾å ´ã«ä»»ãã¦ãããªãï¼ã®å¯¾ç«ããªããã«ã¼ãã²ã¼ã ãã¤ãã£ã話 æ°äººããã°ã©ãã«ç¥ã£ã¦ãããããã¡ã½ãããèªã¿ãããç¶æããããã¤ãã®åå æ°äººããã°ã©ã
(εã»âã»)з åãããããã³ã¼ãã¯ãã¹ãããå®è¡ãããããã®ã§ã! (εã»âã»)з ã«ã¼ãã®å é ã«ãæ» å¤ã«éããªã大ããªå¡ãé ç½®ããã®ã¯ãã¡ãªã®ã§ã! (εã»âã»)з ããããããæ¯ã«ç»é¢ãã¹ã¯ãã¼ã«ããã®ã¯ãä½è¨ãªã¹ãã¬ã¹ãªã®ã§ã! (εã»ï¹ã»)з ãã©ã¦ã¶ã®ãããã¬(IDE) ãªã©ã¯ãããã¹ãã¨ãã£ã¿ãããé åãååç¨åº¦ãããªãã£ããã¨ãä¸åº¦ã«ã¿ããç¯å²ãå°ãªãã®ã§ã for (i = 0; i < 10; ++i) { if (i === 5) { // ä¸åº¦ããéããªãã«ã¼ã : : : : : : : : : : : : : : : : : : : : : : : : : : : : } else { // é »ç¹ã«éãã«ã¼ã : : // çãå¦ç : } } (εã»âã»)з ã«ã¼ãã®å é ã«ã¯ãé »ç¹ã«éãçãã³ã¼ããé ç½®ããã®ã§ã (εã»âã»)з æ» å¤ã«éããªã大ããªå¡ã¯å¾ãã«
ãã®è¨äºã¯Michael Woloszynowiczæ°ã®ããã°Web 2.0 Development And Business Lessonsã®è¨äº"You Don't Know JavaScript"ã翻訳ãããã®ã§ããæ¬äººã®è¨±å¯ãå¾ã¦å ¬éãã¾ããåæã¯2011å¹´4æ16æ¥ã«ãã¹ãããã¾ãããç§èªèº«ã®JavaScriptã®å¦ç¿ãæµ ãã誤訳ã®ææçã¯ã³ã¡ã³ããä¸ããã¨å©ããã¾ãã åæã¯ä»¥ä¸ã®URLããã http://www.w2lessons.com/2011/04/you-dont-know-javascript.html å»å¹´ããããããããããããç¾è±¡ãç®ã«çã¾ãããã«ãªã£ããããã°ã©ãããå°ããã触ã£ã¦ããªãæè¡ã§ãããªãããããã§å±¥æ´æ¸ãèè²ãããã¿ã¼ã³ã«ä½åº¦ãåºä¼ã£ããå¤ãã®è¨èªã§èµ·ãããã¨ã§ã¯ããããæãåæ¶ãåãã¦ããè¨èªãJavaScriptã ã ããªãã¯èªåãç¥ããª
æ°ãããã¨ãåå¼·ãã¦ãä¹ ã ã«å¿åºæåãã¾ããã Twitter ã§ããæ¹ã Fuel ã«ã¤ãã¦ã¤ã¶ããããã¦ããã®ãæè¦ãããã®æåãã¦ãã®åå¨ãç¥ãã¾ãããã PHP ã®æ°ãããã¬ã¼ã ã¯ã¼ã¯ã§ãè¤æ°ã®ãã¬ã¼ã ã¯ã¼ã¯ã®ããã¨ãããéãããã®ã¨ãããã¨ã ã£ãã®ã§ãã¡ãã£ã¨è§¦ã£ã¦ã¿ããã¨ãã¦ã³ãã¼ããã¦ããã¥ã¡ã³ããèªã¿ãªãã Hello World! ãä½ã£ã¦ã¿ããããã¨ã»ã»ã» ãã»ã»ããã¯ãããã»ã» ãªã«ããããã£ã¦ãããã¾ã§ç§ã¯ãCodeIgniterããè¶ æç¨ãã¦ãã¾ãããCodeIgniter ã¯ããã¡ãããã®ã»ã¨ãã©ããããããã®ã§ãããè¥å¹²ã ãä¸æºããã£ãã®ã§ããããããFuelPHP ã§ã¯ CodeIgniter ã®å¥½ããªã¨ããã¯ãã®ã¾ã¾ã«ãä¸æºãå ¨é¨å¹ã£é£ãã§ããã®ã§ãã ã§ã¯ããã®å ¨è²ããè¦§å ¥ãã¾ãããã [åºå] FuelPHP å ¥éæ¸ã®æ±ºå®çãçºå£²ããã¾ããã詳ããã¯ã
社å ã®ç²¾éã¨ã³ã¸ãã¢ãä¸å¿ã«å®æçã«åå¼·ä¼ããããã¨ã«ãªã£ãããã§ã JavaScript ã®è¬ç¾©ã¯åããããã¨ã«ãªã£ãã è³æã社å ã ãã§ã¨ã©ãã¦ããã®ã¯ãã£ãããªãã®ã§ãããã«å ¬éãã¦ããã¾ãã社å ã®äººã社å¤ã®äººãèªãã§ãã ããã è¬ç¾©ã®å 容ã¯åºæ¬çã«ã½ã¼ã¹å«ãã½ã¼ã¹ã¬ãã¥ã¼å½¢å¼ã â»ã¿ã¼ã²ãã㯠JavaScript ã¯æ¸ãããã¨ãªãããªãã¸ã§ã¯ãæåè¨èªããã°ã©ãã Section 00 Prototype.js ã®åã« JavaScript ã®ãªãã¸ã§ã¯ãã®æ¦è¦ã»ã»ã» ãªãã¸ã§ã¯ããä½ã£ã¦ã¿ãã var object = {};ãªãã¸ã§ã¯ãã«ã¡ã½ããã¨ãããããã£ã追å ãã¦ã¿ãã var object = { field: 'ITæ¦å£«', method: function() { alert('hello ' + this.field); } }; object.method()
Firefox ã«ãããªæ©è½ãããã°ãããªã â ããGreasemonkey ã¨ããã®ã§ã§ãããããã â ã¦ã¼ã¶ã¼ã¹ã¯ãªããã¨ãããæ¸ãã°ããã®ã â ã©ããã£ã¦æ¸ããã ï¼ ã¨ããã¨ããããã¹ã¿ã¼ããã¦ãæçµçã«èªä½ã®ã¦ã¼ã¶ã¼ã¹ã¯ãªãããå ¬éããã«è³ãã¾ã§ã®éãåèã«ãããµã¤ããæ¬ãã§ããã ãèªåã®å¦ç¿é ã«æç³»åã«æ²¿ã£ã¦åæãã¦ã¿ã¾ããã JavaScript ãå°ã ããã£ããã¨ã®ãã人ã Greasemonkeyã¹ã¯ãªãããæ¸ãã¦ã¿ããã¨æãç«ã£ãã¨ãã«ããã®å¦ç¿ã®æéã¨ããããéæ¨ã®ãããªãã®ã¨ãã¦å½¹ç«ã¤ãªã³ã¯éã«ãªãã°ãããªã¨æã£ã¦ã¾ãã Greasemonkey ã¾ã㯠Greasemonkey ã£ã¦ãªãã ã¨ããã¦ã¼ã¶ã¼ã¹ã¯ãªããã£ã¦ã©ãæ¸ããã ã¨ããã®ã調ã¹ãã¨ããããã¹ã¿ã¼ããï¼ä»¥ä¸å°è¦åºãããªã³ã¯ã«ãªã£ã¦ãã¾ãï¼ Greasemonkeyã®éçºãã¾ã¨ãã¦ã¿ã ãã㧠Gr
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}