DEV Community

Discussion on: Let me explain to you what is `this`. (Javascript)

Collapse
 
kepta profile image
Kushan Joshi • Edited

Since you tackled this so well. It would be great if you also added the almighty this inside an object constructor function to the flow chart.

To me more specific I am talking about

function Tree(name) {
  this.name = name;
}

var theTree = new Tree('Redwood');

I understand this is not exactly what your are addressing in your article, but new folks might frequently encounter this (oh the irony when talking about this) in these type of functions.

Cheers 🥂

Collapse
 
ycmjason profile image
YCM Jason

I could add this in the note. Not sure where to fit it in the flow chart haha.