What are the benefits of a closure, and when are they typically used?

前端 未结 3 1823
攒了一身酷
攒了一身酷 2020-12-29 07:19

I\'m a web developer, but lots of folks are looking for slightly more advanced skills and understanding closures seems to be at the forefront of this.

I get the whol

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-29 07:50

    There are many JS books available, but you really should grab a copy of David Flanagan's JavaScript: The Definitive Guide if you really want to learn this (still the best JS reference IMHO). Read the chapter on closures and you'll get a lot more in-depth knowledge than anyone can give you in a reply here.

提交回复
热议问题