ãJavaScriptãã¯ã¼ã«ã¤ãã¦åå¼·ããããã£ã¦ã¿ãã
追è¨
artonãããããã©ãã¯ããã¯ãé ãã¾ããã®ã§ãè¨è¿°ã追å ãã¾ããã
JavaScriptãã¯ã¼ã«ã¤ãã¦åå¼·ãããã£ã¦ã¿ãã
1.â
2.Ã
3.Ã
4.â
追è¨
4çªã¯æ¼ç®åã®åªå é ä½ã¨ãããã ãã§ã¯ãªãå½ã0ã¨ãªãã¨ããæ¯ãèããããã§ãã§ã¯falseã¨ããå®æ°ã¯ãªãã ï¼ ã¨çåãæã¤ã®ãæ£ãããã3 & (5 == 1)ãã§ãfalseã¯æ°å¤ã³ã³ããã¹ãã§ã¯0ã ãããã¨ãããã¨ã§ãããã
5.â
â»alert(8 || 10);ã¨alert(8 && 10);ã¯Perlã§ãåãã ããã
6.Ã
7.â
追è¨
ããJavaScriptã®ä¹ç®æ¼ç®åãxã§ã"30" x 2ãã¨æ¸ãã¦ãã£ããPerlerãã²ã£ãããã¾ããã
8.Ã
â»getterã£ã¦ãã¼ã¯ã¼ãã¯åãã¦ç¥ã£ãã
追è¨
ãã¨getterã¯netscapeç³»ï¼ç¾å¨ã¯mozilla)åºæãªã®ã§Firefoxç¨ããã¯ãã¼ã¯ã¬ãããæ¸ãã®ã§ãç¡ãéãæ±ç¨çã«ã¯ç¥ã£ã¦ãã¦ãå½¹ã«ç«ããªãã¨æãã¾ããIEã ã¨ã¹ã¯ãªããã¨ã©ã¼ã«ãªã£ã¦ãã¾ãã®ã§è§£çï¼å®è¡ä¾ï¼ãåãè¾¼ãã§ããªãããã§ãããªãã»ã©ã¼ãã説æãããã¨ããããã¾ããã
9.Ã
â»é
åã®deleteãå¥å¦ã ã¨ããã®ã¯ä½ã¨ãªãç¥ã£ã¦ãããã©ããã£ã±å¥å¦ã ã
追è¨
9çªã¯ãArrayã¨ãã£ã¦ãObjectã¨åãé£æ³é åãããã¨ãããããããªããããé£æ³é åã¨ãã¦å®è£ ããã¦ããã¨ããã®ã¯åãã£ã¦ãã¦ãdeleteç´å¾ã«a.length==3ã®ã¾ã¾ã ã¨ããã®ã¯JavaScriptã®å¥å¦ãªæåã¨ãã¦è¨æ¶ãã¦ãã¾ãããPerlã§delete $hash{$key}ã¨ããã¨ãã®ããã·ã¥ã¨ã³ããªãã®ãã®ãæ¶ããã®ã§ã
ãã®åé¡ãééã£ã¦ãã¾ã£ãã®ã¯ãa[20]=20ã®æç¹ã§a.length==20ã ã¨ç´æçã«æã£ã¦ãã¾ã£ãï¼ã¤ã¾ã0-originã ã¨ãããã¨ãä¸ç¬å¿ãã¦ããï¼ã¨ããããã¼ããªãã ã£ãããã¾ãã
10.â
11.Ã
12.â³
â»ã0.333...335ããÃã2ã¤ç®ã®alertã¯â
13.â
â»ããã¯é¢æ°ãã¤ã³ã¿ã表示ãã¦ãã ãã ããæ®éãªæ°ããããã©ãä½ãä¸æè°ãªã®ã誰ãæãã¦ã
追è¨
é¢æ°ã®å 容ãã®ãã®ã表示ãããã¨ãããã¤ã¤! ã¨ãããã¨ã§ãã(ãããªãåã¯ããã¨ã£ããã©)ãæ½è±¡çãªé¢æ°ãªãã¸ã§ã¯ãã®è¡¨ç¾ã¨ãã§ã¯ãªãã¨ããããã½ã§ãããªãã»ã©ããããããã¨ã§ãããã¦ã£ããã80ã¨è¡¨ç¤ºãããªãã®ããããããã¨ãããã¨ãªã®ãã¨æã£ã¦ãã¾ã£ã¦çåã§ãããã¡ãªã¿ã«var func = new Function("return 80");ã¨evalããã«æ¸ããã®ãã¡ãã£ã¨å¤ãã£ã¦ã¾ãããã
æè¿JavaScriptãç解ã§ããããã«ãªã£ã¦ããã¨ã¯æã£ã¦ããããã©ããã¾ã ã¾ã ä¿®è¡ã足ããªãããã§ããç²¾é²ãã¾ãã