User Tools

Site Tools


java-script:function-context

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
java-script:function-context [2023/08/09 14:51] odeftajava-script:function-context [2023/08/09 14:52] (current) odefta
Line 220: Line 220:
 ==== How to access the context of a parent object inside a nested (child) named function ==== ==== How to access the context of a parent object inside a nested (child) named function ====
  
-Here we'll need to assign the context of the parent function to a variable that the nested function can access. \\ This is commonly done by **assigning this to a variable, often named self or that**, in the parent function's scope.+Here we'll need to assign the context of the parent object to a variable that the nested function can access. \\ This is commonly done by **assigning this to a variable, often named self or that**, in the parent object's scope.
  
 Example: Example:
java-script/function-context.1691581889.txt.gz · Last modified: 2023/08/09 14:51 by odefta