InterviewSolution
Saved Bookmarks
| 1. |
What should be changed in the below code that it prints x, y and z? |
|
Answer» The output right now will be as below, as the method CHAINING is not understood by the compiler. /* Exception: TYPEERROR: A.X(...) is undefined @Scratchpad/1:14:1 */We can GET the desired output by “return this” in each function. |
|