Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Task {
  2.     constructor(id, desc, due, prio) {
  3.         this.id = id;
  4.         this.desc = desc;
  5.         this.due = due;
  6.         this.prio = prio;
  7.     }
  8.  
  9.     print() {
  10.         return "Id: " + this.id + " Desc: " + this.desc + " Due: " + this.due + " Prio: " + this.prio;
  11.     }
  12. }
  13.  
  14. t = new Task(0, 'mein Task', '2018.01.01', 1);
  15. console.log(t.print());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement