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


Please Help Members By Posting Answers For Below Questions

What is question mark in javascript?

496


What are the main features of javascript?

486


How to enabled 'Strict' mode in JavaScript?

579


Are there any predefined constant provided by the browser with the key code values that can be reused?

506


What is differential inheritance?

526






What is the difference between Local Storage and Session Storage?

551


How many types of data types are there?

452


What is difference between java and javascript?

498


How do I run javascript in chrome?

489


What are the variables in javascript?

568


How do I link an external javascript file to html?

479


Should you disable javascript?

489


What is the Infinity property used for in Javascript?

561


Explain how to write class methods vs. Instance methods.

527


What are anonymous functions in Javascript?

540