Question 10
Consider the following javascript code. What will be logged on the console after executing this program?
const Person = function (name, city, pinCode) { this.name = name this.city = city this.pin = pinCode}
Person.prototype.getAddress = function () { return `Name: ${this.name}, City: ${this.city}, ${this.pin}`}
per1 = new Person('Rohit', 'Mumbai', '277403')console.log(per1.getAddress())Name: , City: , Pin:
Name: Rohit, City: Mumbai, Pin: 277403
Name: Rohit, City: Mumbai, 277403
None of these