fork download
  1. // your code goes here
  2.  
  3. function Person(firstName, lastName) {
  4. this.firstName = firstName;
  5. this.lastName = lastName;
  6. this.fullName = (conj) => {
  7. return firstName + conj + lastName;
  8. }
  9. }
  10.  
  11. let p = new Person("Shuvanshu", "Gupta");
  12.  
  13.  
  14. console.log(p.fullName(" is "));
  15.  
  16.  
Success #stdin #stdout 0.03s 18880KB
stdin
Standard input is empty
stdout
Shuvanshu is Gupta