4 ms·
well, you can use jQuery.extend(whateverBatman, *methods) if you want to extend it. (i don't do much JS, but I know just enough to write really bad code)
by roopeshv 15y ago
well, you can use jQuery.extend(whateverBatman, *methods) if you want to extend it.
(i don't do much JS, but I know just enough to write really bad code)
- rahrens 15y agoWhile similarly named, these functions actually do quite different things. jQuery.extend is a function which copies references to properties out of later objects into the first argument. CoffeeScript's extends is a language keyword which creates inheritance relationships in CoffeeScript's built in object model. (Which is similar but not identical to the object model in Backbone.js.)
- asolove 15y agoNo, jQuery.extend copies properties. It is not the same as CoffeeScript's extend, which uses prototypal inheritance as well as copying static properties.