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 the difference between rootscope and scope?

446


What is scope javascript?

545


Which built-in method returns the calling string value converted to lower case?

704


Can you run javascript in notepad?

469


Name the types of functions.

502






Explain what is pop()method in JavaScript?

657


What is the syntax of ‘self invoking function’? Give an example?

480


List some of the advantages of javascript.

472


What are the primitive data types in JavaScript?

542


What is the purpose of 'this' operator in JavaScript?

603


Define event bubbling?

503


What is npm javascript?

474


Difference json arrary vs json object ?

541


What exactly does javascript do?

547


What is the role of a strict mode in javascript?

515