çµè«ããè¨ãã¨, ååãä»ãããã¨ãªãå帰çãªé¢æ°ãå®ç¾©ãããã¨ã¯å¯è½. ç¹å®ã®ããã°ã©ãã³ã°è¨èªã§ã©ããã¨ããããã¯æ½è±¡æ¦å¿µã¨ãã¦ã®é¢æ°ã®å帰ãååãªãã«å®ç¾å¯è½ãã©ããã¨ãã話(ååãªãã«å®ç¾ã§ããããã°ã©ãã³ã°è¨èªã¯åå¨ãããã¨ãã話). çºç«¯ id:naoyaããããããããã¤ã¼ãããã¦ãã. å帰ãæ¸ãã¨ãã«ä½æ°ãªãé¢æ°ã«ååã¤ããã let ã§æç¸ããããã¦ããã©ãå帰ã«ã¯ä¸é é¢ä¿ãå¿ è¦ã§ãããã®å®ç¾ã«ã¯è¨å·ãæ¬è³ªçã«é¢ãããã¨ãããååã¥ãã®è¡çºãå¿ ç¶ã ã£ããã¨ãåãã£ããããã°ã©ãã³ã°ããã¨ãã®è¦ç¹ãå¤ãããªâ naoya (@naoya_ito) 2022å¹´8æ12æ¥ ãã¨ãã°ä»¥ä¸ã®ããã«æ¸ããã¨ãã®let fact =ã¿ãããªè©±. let fact = n => n <= 1 ? 1 : n * fact(n-1) ã¡ãªã¿ã«, 話ã¯ä¸è¦é¸ãããã©, ããæ¸ããã¨å¿ ç¶çã«
{{#tags}}- {{label}}
{{/tags}}