You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/04-js/README.md
+1
Original file line number
Diff line number
Diff line change
@@ -375,6 +375,7 @@ Let’s recap:
375
375
- We created functions to group our code into reusable blocks.
376
376
- We manipulated the DOM to interact with our HTML elements.
377
377
- We handled events to respond to user actions.
378
+
- We used closures to maintain access to important variables, enabling our drag-and-drop functionality to work correctly by keeping track of the mouse and element positions even after the initial function has executed.
378
379
379
380
By combining all these concepts, we created a dynamic and interactive virtual terrarium where the plants can be dragged around the screen.
0 commit comments