Quick actions

cmd+k|ctrl+k

Navigation

Languages

prototype

Snippet info

Language

JavaScript

Visibility

public

Author

yann

Created

2016-08-31T08:05:00Z

Updated

2016-08-31T08:09:20Z


function Link(id, next) {
    this.next = next;
    this.id = id;
    this.get = function (i) {
        console.log(i);
    };
}

Link.prototype.get2 = function(i) {
    console.log(i);
};

var a = new Link(1, 'next');
a.get('get');
a.get2('get2');

console.log(a);
console.log(Link);
console.log(Link.prototype);
INFO