I'm trying to create a Car item with some values, but the function ShowCar doesn't show anything when I run the program...
<script>
function Car(model,price,topspeed,acceleration,consumption) {
this.model=model;
this.price=price;
this.topspeed=topspeed;
this.acceleration=acceleration;
this.consumption=consumption;
}
function ShowCar() {
document.write("Model:"+this.model+"<br>");
document.write("Price:"+this.price+"<br>");
document.write("Topspeed:"+this.topspeed+"<br>");
document.write("Acceleration:"+this.acceleration+"<br>");
document.write("Average Consumption:"+this.consumption+"<hr>");
}
</script>
</head>
<body>
<h1> Car List </h1>
<script>
Car1=new Car("Seat Ibiza","6.500 euros","190 km/h","9.7 s","5.3 l/100km");
Car1.ShowCar();
</script>
</body>