Javascript — 第 06天

MonLes
·
·
IPFS
·



你可在github找到 source code | Here



本日主題

  • 進階函式Advanced Function
  • -閉包closure
  • -currying
  • -compose
  • 進階陣列Advanced Arrays
  • -forEach
  • -mapArray
  • -filter
  • 進階物件Advanced Objects
  • -reference type
  • -context
  • -instantiation


閉包Closure

  • 一個函式執行
  • 不會再跑一遍
  • child scope會記得reference,可進入 parent scope
  • 但parent scope 無法進入child scope



Currying



Compose




Advanced Arrays
forEach & mapArray 差異在於
mapArray總有回傳值(returned value)

forEach



mapArray




filter




reduce

超好用💪





進階物件advanced Object

reference type



context

就像是javascript環境

實例化instantiation

更多資訊 | MDN



CC BY-NC-ND 2.0

Like my work? Don't forget to support and clap, let me know that you are with me on the road of creation. Keep this enthusiasm together!

MonLes嘗試從都市叢林回到魔法森林。 更多作品 | https://linktr.ee/monles
  • Author
  • More

React.js — 第07天

Javascript — 第09天

Javascript in Leetcode 22–24 | 面試問題