From 748717bb2a1eb4d5f4ddd81379e9dc7c4a353b4a Mon Sep 17 00:00:00 2001 From: Jen Looper Date: Fri, 11 Dec 2020 12:41:12 -0500 Subject: [PATCH] editing info on closures --- 3-terrarium/3-intro-to-DOM-and-closures/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/3-terrarium/3-intro-to-DOM-and-closures/README.md b/3-terrarium/3-intro-to-DOM-and-closures/README.md index 05ee7194..198ec6f1 100644 --- a/3-terrarium/3-intro-to-DOM-and-closures/README.md +++ b/3-terrarium/3-intro-to-DOM-and-closures/README.md @@ -13,9 +13,11 @@ Manipulating the DOM, or the "Document Object Model", is a key aspect of web dev In addition, this lesson will introduce the idea of a [JavaScript closure](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures), which you can think of as a function enclosed by another function so that the inner function has access to the outer function's scope. +> JavaScript closures are a vast and complex topic. This lesson touches on the most basic idea that in this terrarium's code, you will find a closure: an inner function and an outer function constructed in a way to allow the inner function access to the outer function's scope. For much more information on how this works, please visit the [extensive documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures). + We will use a closure to manipulate the DOM. -> Think of the DOM as a tree, representing all the ways that a web page document can be manipulated. Various APIs (Application Program Interfaces) have been written so that programmers, using their programming language of choice, can access the DOM and edit, change, rearrange, and otherwise manage it. +Think of the DOM as a tree, representing all the ways that a web page document can be manipulated. Various APIs (Application Program Interfaces) have been written so that programmers, using their programming language of choice, can access the DOM and edit, change, rearrange, and otherwise manage it. ![DOM tree representation](./images/dom-tree.png)