Functional-Light JavaScript: Balanced, Pragmatic FP in JavaScript by Kyle Simpson

Functional-Light JavaScript: Balanced, Pragmatic FP in JavaScript by Kyle Simpson

Author:Kyle Simpson
Language: eng
Format: mobi, epub
Publisher: Manning Publications Co.
Published: 2017-11-27T00:00:00+00:00


The Same Page

First, let’s make sure we’re all on the same page when we refer to closures and objects. We’re obviously in the context of how JavaScript deals with these two mechanisms, and specifically talking about simple function closure (see Chapter 2, “Keeping Scope”) and simple objects (collections of key-value pairs).

For the record, here’s an illustration of a simple function closure:

function outer() {

var one = 1;

var two = 2;

return function inner(){

return one + two;

};

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.