JavaScript RHGèªæ¸ä¼::æ±äº¬ å ¥éJavaScript 第åå - ããã«ã (2007-04-14) ã¯ããã¦ããã¾ããã // Firebugåºåã®ã·ã§ã¼ãã«ãã function p(x){console.log(x)} // evalã®åºæ¬ãç¢ºèª var context = {a : 50}; // evalã®ã³ã³ããã¹ããªãã¸ã§ã¯ã p(context.eval("a")) // 50ãcontextã®ä¸ã§è©ä¾¡ p(eval("a", context)) // 50 å ¥ãæ¿ãã¦ãåã // ã«ã¦ã³ã¿ã¯ãã¼ã¸ã£ã¼ãçæããé¢æ° function counter(){ var num = 0; return function(){ return ++num; } } // å®éã«ã«ã¦ã³ã¿ã¼ãä½æ var count = counter(); p(count());
{{#tags}}- {{label}}
{{/tags}}