Lets do the following exercise:
var my = objectMulti(obj, another_obj, a_third, { additional: "properties" });
The additional
property should be an own property; all the rest should be mixed into the prototype.
canvas
example to practice. Try out different things. Here are some examples:Trapezoid
, Rhombus
, Kite
, and Pentagon
. If you want to learn more about the canvas
tag, create a Circle
constructor too. It will need to overwrite the draw()
method of the parent.uber
as a way for a child to access its parent. Add functionality where the parents can keep track of who their children are, perhaps using a property that contains a children
array?18.118.200.197