Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Another _extend Example

       Person = function(name)
       {
        this.name = name;
       }

_.extend(Person.prototype, {x: function(){return this.name+"XXXXXXXXX"}});


const p = new Person("John smith");
console.log(p.x());
Source by backbonejs.org #
 
PREVIOUS NEXT
Tagged: #Another #Example
ADD COMMENT
Topic
Name
3+8 =