Solution Review: Chaining Methods and Properties
Let's look at the solution of the Chaining Methods and Properties challenge.
We'll cover the following...
We'll cover the following...
Solution
Explanation
- Line 2: We write the
Userclass with$firstNameas a public property. - Line 5: We write the hello() method that says
helloto the user. We return$this