Paste Search Dynamic
Recent pastes
class Teleport
  1. class Teleport {
  2. constructor(n, pl)
  3. {
  4. this.name = n;
  5. this. space = pl;
  6.     }
  7.   message () {
  8.     return 'Doctor Whо';
  9.   }
  10. }
  11. p = new Teleport("Tardis", 100000);
  12. print(p.name ,p.space);
  13. print(p.message());
  14.  
  15. r = new Teleport("Budka", 2);
  16. print(r.name, r.space);
  17. print(r.message());
Parsed in 0.002 seconds