Tuesday, October 24, 2017

extend in Underscore.js

_.extend(yin, yang);

 
 

This is going to copy all of the properties from yang to yin which will get those properties in addtion to the ones it already had. It is basically like...

for (var property in yang) {
   yin[property] = yang[property];
}

No comments:

Post a Comment