Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let Test = function(name) {
- this.name = name;
- this.complete = function() {
- console.log(`completing task${this.name}`)
- }
- }
- let Test = function(name) {
- this.name = name;
- }
- Test.prototype.complete = function() {
- console.log(`completing task${this.name}`)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement