How do I create a method that returns a new constructor instead of an object?
How to extend a javascript constructor?I want to be able to extend a constructor and use its methods. The problem is when I do the following property values are being shared.
var Message = new Resource('message');
var Conversation = new Resource('conversation);
Conversation.limit = 5;
Message.limit = 8;
Conversation.getData() // pulls 8 items insteadHow do I create a method that returns a new constructor instead of an object?
No any search results
You already invited:
0 Answers