Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Function Returning This

If you want something like first.second.third = /*yields a "function that instantiates an object"*/,
  we would write first.second = function()/*the instantiating function goes here*/ and then for first.second.third = function(){return this}. You can think of this as "the owner" or "the previous" before the function (e.g. first.second is the previous of third).
  
 
PREVIOUS NEXT
Tagged: #Function #Returning #This
ADD COMMENT
Topic
Name
9+2 =