Making Sense Of JavaScript’s Closure With Some Examples

Xiaoyun Yang
Jan 25, 2018 · 4 min read
Photo by Riccardo Annandale on Unsplash

What is a Closure?

var multThenAdd = num => mul => add => num * mul + add
const myFun2 = myFun(arg1)
myFun2(arg2)

DailyJS

JavaScript news and opinion.

Xiaoyun Yang

Written by

Software engineer, entrepreneur. Founder of LooseLeaf: https://www.looseleafapp.com. My website and blog: https://xiaoyunyang.github.io/

DailyJS

DailyJS

JavaScript news and opinion.