According to the underscore document, Api _.extend method -
_.extend(destination, *sources)
First example
_.extend(parent, child);
In this code example, you are actually extending properties from a child to a parent. Here the parent is modified.
Second example
_.extend({}, parent, child);
In case you do not want to modify the parent object and still want both properties to be parent and child. You can use this one. Here you distribute the parent and child to the new object.
syed imty
source share