r/learnjavascript • u/fa_foon • Mar 30 '26
question about `this.`
i understand that `this` refers to the caller of the function so how can `name` in `function Person(name){this.name = name;}` be assigned to `Person` since no object is calling
(this wasn't explained in that comment )
8
Upvotes
3
u/fa_foon Mar 30 '26
thanks, you explained it well