Object.assign instanceof failure

by windhandelimprov

JavaScript

function Car(make, model, year) {
  this.make = make;
  this.model = model;
  this.year = year;
}

let testCar = Object.assign(new Car(), {
	make: 'Eagle',
  model: 'Talon TSi',
  year: '1993'
});

alert(testCar instanceof Car);
alert(testCar.year instanceof Number);