Java Reference
In-Depth Information
• A mixin method can be used to add properties and methods from other objects
without creating an inheritance chain.
• Methods can be changed together and called in sequence if they return a reference
to this.
• Polymorphism is when the same method is used by two unique objects in different
• The value of this is not retained inside nested functions, which can cause errors.
This can be worked around by using that = this or using the bind(this)
• Methods can be borrowed from objects.
In the next chapter, we'll be looking at how to send and receive data using JavaScript.
[5] There's more about shallow and deep copies later in the chapter.
[6] The Ruby programming community, on the other hand, generally embrace monkey-
patching, so it is quite common in Ruby code examples.
Search WWH ::

Custom Search