ãã®è¨äºã§ã¯ JavaScript ã¨ã³ã¸ãã¢ããã¦ãã¾ããã¡ãªãã誤解ãç´¹ä»ããããããªã誤解ãªã®ãã解説ãã¾ãã ãã®èª¤è§£ã¨ã¯ããé¢æ°å®£è¨ã«ã¯å¿ ãååãå¿ è¦ã§ãããã¨ãããã¨ã§ããããã¯export defaultã®å ´åã«ä¾å¤ãåå¨ãã¦ããããã誤解ã¨ãªãã¾ãã JavaScript ã®é¢æ°å®£è¨ JavaScript ã§é¢æ°ãä½ãæ¹æ³ã¯è²ã ããã¾ããããã®ä¸ã§ãfunctionãã¼ã¯ã¼ããç¨ããæ¹æ³ã¯åæããåå¨ãã¦ãã¾ããfunctionãã¼ã¯ã¼ããç¨ãã¦é¢æ°ãä½ãå ´åã¯é¢æ°å¼ã¨é¢æ°å®£è¨ã® 2 ã¤ã«å¤§å¥ããã¾ããé¢æ°å¼ã¯ãã®åã®éãå¼ã§ããä¸æ¹ã§ãé¢æ°å®£è¨ã¯æã®ããã«ä½¿ç¨ãããå·»ãä¸ã (hoisting) ã®æåãæã¤ãã¨ãç¹å¾´çã§ãã // é¢æ°å¼ const func = function (num) { return num * 2; }; console.log(func(