Which of the following JavaScript will create an alert box containing "Hello Eshika P "?
Back to Questionsvar Employee = function (firstName, lastName, age) { this.firstName = firstName; this.lastName = lastName; this.age = age;};Employee = new Employee("Eshika", "P", "24");Employee.prototype.SayHello = function () { alert("Hello" + this.firstName + " " + this.lastName);};Employee.SayHello();
var Employee = function (firstName, lastName, age) { this.firstName = firstName; this.lastName = lastName; this.age = age;};Employee = new Employee("Eshika", "P", "24");Employee.SayHello = function () { alert("Hello" + this.firstName + " " + this.lastName);};Employee.SayHello();
var Employee = { firstName: "Eshika", lastName: "P", age:"24"};Employee.SayHello = function () { alert("Hello" + this.firstName + " " + this.lastName);};Employee.SayHello();
var Employee = { firstName: "Eshika", lastName: "P", age:"24"};Employee.prototype.SayHello = function () { alert("Hello" + this.firstName + " " + this.lastName);};Employee.SayHello();
.
Answers Posted
PostedBy By: Abdul Samad Qureshi, at 02:54 PM on 27-March-2019
Answer Posted:
Explanation: I guess so
Result: Wrong Answer