What is the output of below code
var car = new Vehicle("Honda", "white", "2010", "UK");
console.log(car);
function Vehicle(model, color, year, country) {
this.model = model;
this.color = color;
this.year = year;
this.country = country;
}
Answer Posted / hrpatelsoft@gmail.com
{model: "Honda", color: "white", year: "2010", country: "UK"}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to create objects in JavaScript?
Is it possible make a call to server side event of any button using javascript?
How to get the last index of a string in javascript?
What is the use of anonymous function in javascript?
How javascript sort function works?
Where do I put javascript code in html?
How to add behavior to an element using javascript?
What is null javascript?
Enumerate the differences between Java and JavaScript?
What is unobtrusive javascript? How to add behavior to an element using javascript?
Why javascript is fast?
How can I learn coding fast?
What are the predefined functions in javascript?
What does _ mean in javascript?
What is a fixed-width table and its advantages?