0/javascript (11) 썸네일형 리스트형 What is a Closure? A closure is the combination of a function and the lexical environment within which that function was declared.-- MDN web docs - Then, what is the lexical environment? Lexical scoping 123456789101112131415161718function init(){ var name = "J.Cole"; /* printName has no local variables of its own. However, because inner functions have access to the variables of outer functions, printName() can acc.. What is a Promise? The Promise object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value. 1234567891011121314var promise1 = new Promise(function(resolve, reject) { setTimeout(function() { resolve('foo'); }, 300);}); promise1.then(function(value) { console.log(value); // expected output: "foo"}); console.log(promise1);// expected output: [object Promise] Colored by.. Node.js An open-source, cross-platform JavaScript run-time environment that executes JavaScript code outside of a browser.JavaScript is used primarily for client-side scripting, in which scripts written in JavaScript are embedded in a webpage's HTML and run client-side by a JavaScript engine in the user's web browser.Node.js lets developers use JavaScript to write command line tools and for server-side .. 이전 1 2 다음