Javascript Coding Interview Questions & Answers

1. 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; } 1: Undefined 2: ReferenceError 3: null 4: {model: “Honda”, color: “white”, year: “2010”, country: “UK”} Answer Answer: 4 The
SiteLock