function Character(name, age, hobby) {
this.name = name;
this.age = age;
this.hobby = hobby;
}
Character.prototype.bio = function() {
return `Hi there, I'm ${this.name}, a ${this.age}-year-old who loves working with ${this.hobby}!`;
}
Character.prototype.interests = ['programming', 'workout', 'hanging out with friends'];
const sourav = new Character('Sourav', 16, 'Node.js');
console.log(sourav.bio());
console.log(`My interests include: ${sourav.interests.join(', ')}.`);
souravkl11 Goto Github PK
Name: Sourav
Type: User
Bio: self taught, hobby dev :)
Location: Kozhikode, Kerala, India
Blog: https://souravkl11.xyz