Build skills to meet changing business needs with Codecademy Teams â
ãã®å訳ã«ã¤ãã¦Â¶ ãã®æç« ã¯ Google JavaScript Style Guide ãéå ¬å¼ã«å訳ãããã®ã§ã. å 容ã®æ£ç¢ºæ§ã¯ä¿è¨¼ãã¾ãã. ã©ã¤ã»ã³ã¹ã¯åæã¨åãã CC-By 3.0 ã¨ãã¾ã. ãã£ã¼ãããã¯ã¯ Issue ã¸ã®ç»é² , ããã㯠Kosei Moriyama (@cou929 ã¾ã㯠cou929 at gmail.com) ã¸ç´æ¥ãé¡ããã¾ã. ãã®å訳ã®ãªãã¸ããªã¯ ãã¡ã ã§ã.
30 best practices to boost your web application performance - Web User Interface Architect JavaScriptã³ã¼ãã£ã³ã°çãæ¸ãä¸ã§ã®ããã©ã¼ãã³ã¹ç¢ºèªäºé ï¼ï¼ã èªåã¸ã®ã¤ã³ãããï¼ã¡ã¢ãã¦ãã«ã¡ãã£ã¨ã¾ã¨ãã¦ã¿ã¾ãã JavaScript DOMã®æä½ã¯å¯è½ãªéãããã eval, new Function() ã¯é ãã®ã§å¯è½ãªéã使ããªã withã¹ãã¼ãã¡ã³ãã使ããªãï¼ä½¿ã£ãäºãªãã§ããï¼ for-in æã§ã¯ãªã for æã使ãã ã«ã¼ãã®ä¸ã§ try-catch ã§ã¯ãªããtry-catchã®ä¸ã«ã«ã¼ããç½®ã ã°ãã¼ãã«å¤æ°ããªãã¹ã使ããªã aaa+='AAA';aaa+='BBB'; ã®æ¹ã aaa+='AAA'+'BBB';ããéã è¤æ°ã®æååé£çµã«ã¯ãArray ã§æåå
ããã«ã¡ã¯ã太ç°ã§ããååã¯JavaScriptããã¿ãHTMLã®åºæ¬ãä¸å¿ã«è§£èª¬ãã¾ãããä»åã¯ã¾ããã¤ãã³ãã«ã¤ãã¦è§£èª¬ãã¾ããJavaScriptãDOMã«ããã¦ã¤ãã³ãã¯æ¥µãã¦éè¦ã§ãããã©ã¦ã¶ä¸ã®JavaScriptã§ã¯å¿ ãã¨ãã£ã¦ããã»ã©ã¤ãã³ãã絡ãã§ãã¾ãããã¦ã§ãã¢ããªã±ã¼ã·ã§ã³ãã³ã³ããã¼ã«ããæ ¹å¹¹çãªæè¡ã¨è¨ããã»ã©ã§ãã JavaScriptã¨ã¤ãã³ã ãã©ã¦ã¶ã¯scriptã¿ã°ã§æå®ãããJavaScriptã解éãã¦å®è¡ãã¾ãããã®æãé¢æ°ãªã©ãå®ç¾©ããã ãã«ãã¦ãå®éã«ãã®å¦çãè¡ãããã®ã¯ã¦ã¼ã¶ã¼ããã¿ã³ãã¯ãªãã¯ããæããä½ããå ¥åããæãªã©ãã¦ã¼ã¶ã¼ã®ä½ããã®ã¢ã¯ã·ã§ã³ã«é¢é£ä»ãã¦JavaScriptãå®è¡ããããã¨ãã§ãã¾ããããã«ã¯ãã¦ã¼ã¶ã¼ã®ã¢ã¯ã·ã§ã³ã ãã§ãªãããã¼ã¸ã®èªã¿è¾¼ã¿ãéä¿¡å¦çã®å®äºå¾ãªã©ããã©ã¦ã¶ä¸ã§èµ·ããããããã¤ãã³ãã«ã¤ãã¦å¦ç
linq.jsã£ã¦ãããã°ãã«ããããâ¦â¦ããããããæ¹ãåããã°ããããããããããããã¨ãã解説ãåç»ã§ãHDãªã®ã§æåãè¦ããªãå ´åã¯ãã«ã¹ã¯ãªã¼ã³ãªã©ãªã©ã§ã©ãããä¸èº«ã®è¦ããªãEnumerableã¯ããããã¬ã§æ¢ãã¦ã¦ã©ããã¦ã£ã³ãã¦ã§ToArrayããã°è¦ãã¾ããã¦ã©ããã¦ã£ã³ãã¦å ã§ã¡ã½ãããã§ã¼ã³ãç¹ãã¦è¡¨ç¤ºåºæ¥ãã¨ããã®ã¯ãã«ã¼ããæ½è±¡åããã¦ããLinqãªãã§ã¯ã®å©ç¹ãsortããããä½ãããããimmutableãªã®ã§å ã·ã¼ã±ã³ã¹ã«å½±é¿ãä¸ãã¾ãããã©ã ãå¼ãã©ãã§ã¤ã³ã¿ã©ã¯ãã£ãã«æ¡ä»¶ãå¤ãã¦ç¢ºèªåºæ¥ããããã®ã楽ã¡ãã ã¨ããã§ãJavaScriptéçºã§ãIDEç¡ãã¯èãããã¾ããããããã°ã¨ããã ããªãFirebugãã¢ãªã§ã¯ããã¾ãããå ¥åè£å®ãæ´å½¢ãå¯è½ãªé«æ©è½ã¨ãã£ã¿ã¨å¯æ¥ã«çµã³ã¤ãã¦ãããã¨ããç¹ã§IDEã«è»é ããããããããªããã¨ç§ã¯æã£ã¦ãã¾ããå
ç¶ã ã¨å¢ãç¶ããåºç¤ææ³æéãã¹ã¿ã¼ã·ãªã¼ãº(ãã¾ãã«ãå¢ãã¦ããã®ã§ä»ã®è¨èªè¨äºã¸ã®ãªã³ã¯ã¯å¥ã®è¨äºã«ç§»ãã¾ãã)ã JavaScript çã¯èª°ãæ¸ãã¦ããªãã£ããããªã®ã§æ¸ãã¦ã¿ã¾ãããããã解説è¨äºçãªãã®ãæ¸ãã®ã¯åãã¦ãªã®ã§å¤ãªã¨ããããã£ããææãã¦é ããã¨ãããããã§ãã JavaScriptã®åºç¤æ¦å¿µã«ã¤ãã¦ã®è§£èª¬ã¯ãã¡ãï¼JavaScriptåºæ¬æ¦å¿µæéãã¹ã¿ã¼ - TechTalkManiacs 1/31 23:58è¿½è¨ ã³ã¡ã³ãæ¬ã®os0xããã®ãææãåºã«ä¸é¨è¿½è¨ã»ä¿®æ£ãè¡ãã¾ããã 2/2 2:52è¿½è¨ switchæã»æ£è¦è¡¨ç¾ã»ä¾å¤å¦çã«ã¤ãã¦è¿½å ãã¾ããã 2/2 6:44è¿½è¨ ã³ã¡ã³ãã§favrilããã«ãææé ããç¹(typo & ã³ã¡ã³ãã»ãµã³ãã«è¿½å )ãä¿®æ£ã»å çãã¾ããã 2/2 7:15è¿½è¨ ãã©ãã¯ããã¯ã§LiosKããã«ãææé ããç¹(cal
ä»åã¯ã¤ãã³ãã«ã¤ãã¦å¦ãã§ããã¾ããããJavaScriptã«ããã¢ããªã±ã¼ã·ã§ã³ãä½æããããã§ã¯ï¼ã¤ãã³ãã¯æ¬ ãããã¨ãã§ããªãè¦ç´ ã§ãã ããã§ã¯ï¼æ§æ¥ãã使ããã¦ããã¤ãã³ããã³ãã©ã®ããããã¨ï¼ã¤ãã³ããã³ãã©ã®åé¡ç¹ãèå¯ãã¾ããããã¦ï¼ã¤ãã³ããã³ãã©ã«ç½®ãæããW3C DOMã¤ãã³ãã¢ãã«ã®åºç¤ãå¦ãã§ããã¾ãã ã¤ãã³ãã¨ã¯ ã¤ãã³ãã¨ã¯ï¼ãã©ã¦ã¶ä¸ã§çºçããåºæ¥äºå ¨è¬ã®ãã¨ã表ãã¾ããä¾ãã°ï¼ãã©ã¦ã¶ã«è¡¨ç¤ºãããç»é¢ä¸ã§ãã¦ã¹ãã¯ãªãã¯ãããï¼ããã¹ãããã¯ã¹ã«æåãå ¥åããã¨ãã£ãããã«ï¼é²è¦§è ãä½ãæä½ããã¨ãã«ã¤ãã³ããçºçãã¾ããã¾ãï¼HTMLããã©ã¦ã¶ã«èªã¿è¾¼ã¾ãããï¼å¥ã®ãã¼ã¸ã«ç§»åããã¨ããç¾è±¡ãã¤ãã³ãã¨ãã¦èªèããã¾ãã ã¾ãã¯ããã«ï¼æ§æ¥ãã使ããã¦ããã¤ãã³ããã³ãã©ã«ã¤ãã¦ãããããã¾ãããã ã¤ãã³ããã³ãã© ã¤ãã³ããJavaScriptã§
ã横éã«ãããããã«æ¸ããäºæ ã§ãEmacsã§JavaScriptã½ã¼ã¹ã³ã¼ããèªãç°å¢ãå°ãæ´ããããã¨ã 次ã®2ã¤ã®ãã¼ã«ãå°å ¥ãã¦ã¿ãããã£ã¨ã js2-modeï¼ http://code.google.com/p/js2-mode/ ã¨ã°ãºã¼ãã©ã³ãï¼EXUBERANTï¼Ctagsï¼ http://ctags.sourceforge.net/ å å®¹ï¼ ããè¯ãEmacs JavaScriptã¢ã¼ã -- js2-mode å¼·çãªã¿ã°ãã¡ã¤ã«ä½æãã¼ã« -- ã¨ã°ãºã¼ãã©ã³ãCtags ã¨ã°ãºã¼ãã©ã³ãCtagsã調ã¹ã¦ã¿ã Emacsã§JavaScriptã½ã¼ã¹ãèªã âããè¯ãEmacs JavaScriptã¢ã¼ã -- js2-mode 以åï¼2006å¹´7æï¼ãã²ãã½ãããã®è¨äºã§ããecmascript-mode.el ï¼ javascript.el ã¿ããã ãã¨æ¸ãã¦ãã£ã
æ°ã¥ãããã¨ããã¹ãããã¨ãªã©ã¡ã¢ãã¦ããã®ã§ç¢ºèªä½æ¥ãç´°ããä»æ§ã ã£ããæé»ã®ã«ã¼ã«ã ã£ããããã¯ããã¯ã ã£ãããJSã«æ £ãã¦ãããå½ããåãªãã¨ã°ãããããããã 追è¨ã®ã¨ããã¯id:os0xããããããããã¨ããããã¾ãï¼ undefined var a; alert(a) // undefined 宣è¨ã ãã ã¨undefinedãundefinedã¨ããã®ã¯ã宣è¨ãã¦ããå¤æ°ã«å¤ãå ¥ã£ã¦ãã¾ããããã¨ãããã¨ã ããã¦ãªãã¸ã§ã¯ãã«ã¯ç¡ãããããã£ã¨ãåç §ããã¨åºã¦ããã var a = 100; alert(a.length); // undefined ããã«å¼æ°ãã function func(val) { alert(val); } func() // undefined å¼æ°ã¯Callãªãã¸ã§ã¯ãã£ã¦ã®ã«æ ¼ç´ãããããã®ãªãã¸ã§ã¯ãã¯ãã¼ã«ã«ã®å¤æ°ãæ ¼ç´ããããªãã¸ã§ã¯ã
æ¨ç请æ±å¨Webæå¡å¨ä¸æ²¡ææ¾å°å¯¹åºçç«ç¹ï¼ å¯è½åå ï¼ æ¨æ²¡æå°æ¤ååæIPç»å®å°å¯¹åºç«ç¹! é ç½®æ件æªçæ! å¦ä½è§£å³ï¼ æ£æ¥æ¯å¦å·²ç»ç»å®å°å¯¹åºç«ç¹ï¼è¥ç¡®è®¤å·²ç»å®ï¼è¯·å°è¯éè½½Webæå¡ï¼ æ£æ¥ç«¯å£æ¯å¦æ£ç¡®ï¼ è¥æ¨ä½¿ç¨äºCDN产åï¼è¯·å°è¯æ¸ é¤CDNç¼åï¼ æ®éç½ç«è®¿å®¢ï¼è¯·èç³»ç½ç«ç®¡çåï¼
è¿å¹´ï¼Ajaxã®å°é ããã£ããã«ï¼JavaScriptã使ã£ããã©ã¦ã¶ã®ãªããã»ã¯ã©ã¤ã¢ã³ãåãé²ãã§ãã¾ãããç¾å¨ã§ã¯ï¼ãã¼ã¸ã®è¡¨ç¤ºãå¤åãããã ãã§ããã°ï¼ã»ã¨ãã©ã®ãã¨ã¯JavaScriptã®ã¿ã§å¯¾å¦ãããã¨ãå¯è½ã§ãããããå®ç¾ããã®ãDOMãªã®ã§ãã 第1åãDOMããå§ããã¢ãã³ã»ã¹ã¯ãªããã£ã³ã°ã®ä¸çã¸ãããã 第2åããã©ã¦ã¶ããHTMLã¯ã©ãè¦ãã¦ããããç解ããã ï½ããã¥ã¡ã³ãããªã¼ï½ 第3åãDOMã¹ã¯ãªããã£ã³ã°ã®ãã¨ã¯ãã(1) ï½è¦ç´ ï¼ã¿ã°ï¼ãçãæã¡ï½ 第4åãDOMã¹ã¯ãªããã£ã³ã°ã®ãã¨ã¯ãã(2) ï½ããã¯ã©ããªè¦ç´ ï¼ï½ 第5åãDOMã使ã£ã¦HTMLãèªç±èªå¨ã«æ¸ãæãã 第6åãã¤ãã³ããã³ãã©ããè±å´ããã 第7åãã¹ã¯ãªãããå®å ¨ã«åé¢ããã ï½ã³ã³ãã³ãï¼ãã¬ã¼ã³ãã¼ã·ã§ã³ï¼ããã¤ãã¢ï½ 第8åãã¹ã¯ãªããã®ããã±ã¼ã¸å ï½ä½¿ãåãã§ããã¹ã¯ãª
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}