Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var test = function(firstname, lastname){
- this.firstname = firstname;
- this.lastname = lastname;
- }
- test.prototype.hello = function(){
- console.log(this);
- console.log('Hello! ' + this.firstname);
- }
- let tester = new test('a', 'b');
- tester.hello();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement