Web appOpen in Telegram
JJavaScript/Node.js 台灣
JavaScript/Node.js 台灣
@JavaScriptTw · group · Tech · indexed since 2026-07-05 archive for January 2020
1 999members−15 in a week
4writing in 30 days
15messages in 30 days
103 295messages in the index

Messages from January 2020

‹ January 2020 ›×
元
还是不大明白怎么无限返回能返回函数的函数??话都不会说了。我学的太少了,慢慢来
F
sum 返回的 函數物件 可以接受 任意個數字 ,呼叫這個 函數物件 後,他會再次呼叫 sum ,並把 參數裡的所有數字加上去目前數字後 ,返回這次呼叫 sum 所取得的 新函數物件
Whole thread · 1 reply →
D
哦,我也刚看明白了,其实这个没什么值得研究的,就是个语法问题,语法规定让怎么用咱们就怎么用吧。自己研究不出来的。
L
繁體也叫closure閉包 但你可能理解錯了,跟java類別沒什麼關系。
D
我真不懂,也是刚刚看了篇文章,挺有意思,但是自己应该不敢这样用。
  1. フ
    這個還算囉唆的了 多了一個 function s 但比較沒有 side effect
Whole thread · 1 reply →
T
不知道還有沒有更高明的寫法,我只能這樣解了
  1. 元
    看上面有个博文链接,讲的挺好。累加值不用费劲,因为是闭包环境。无限返回函数就是函数返回自身名称😀,这个我怎么想都没敢想。。
Whole thread · 1 reply →
フ
有 side effect 的寫法是把值塞在 sum sumOf 的時候要清掉
元
直接错觉成会死循环了。。背后的问题是对调用堆栈不熟悉的问题
Whole thread · 1 reply →
阿
Sticker
sticker.webp · 30 KB · click to show
😞

An open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog · Search · How we count