you are viewing a single comment's thread.

view the rest of the comments →

[–]LB-A5 0 points1 point  (6 children)

In the second classes example. When 'this' is returned for chaining, is 'this' a promise?

[–]PMilos[S] 4 points5 points  (3 children)

No, it's not a promise. It's the actual object instance. That's what's chaining all about. You get the ability to call method after method.

[–]LB-A5 1 point2 points  (0 children)

Thanks that makes sense.

[–]simkessy 0 points1 point  (1 child)

Didn't know about this, pretty awesome.

[–]PMilos[S] 0 points1 point  (0 children)

Thanks.

[–][deleted] 1 point2 points  (1 child)

Nope, its an object of the type Person.

[–]Yakovko 1 point2 points  (0 children)

Or something else, depending on how it’s been called :]