Advertisement
Guest User

Untitled

a guest
Jul 11th, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class User {
  2.     name: string;
  3.     email: string;
  4.     age: number;
  5.  
  6.     constructor(name: string, email: string,age: number){
  7.         this.name = name;
  8.         this.email = email;
  9.         this.age = age;
  10.  
  11.         console.log('User Created: '+this.name);
  12.     }
  13. }
  14.  
  15. var john = new User('John Doe', 'jdoe@outlook.com', 34);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement