I am working on javascript objects. I am creating an array for 'Parrot Computer'. When I run the following code, it does not display on the browser and there is a javascript error message: unexpected ')' token. Kindly assist.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Objects</title>
<script>
function f1(){
var commodity={
Id : 1,
Name : "Parrot Computer",
price : "350.00",
IsInStock : true,
Quantity : 5,
shippedTo : ['San Francisco', 'Los Angeles'],
Total : function(){
return commodity.Quantity*commodity.price;
}
}
if(commodity.IsInStock==true)
stock="Available";
else
stock="out of stock";
document.write("Id : " +commodity.Id+ "<br>" + "Name=" +commodity.Name+ "<br>" + "price= " +commodity.price+ "<br>" + "Is in stock" +stock+ "<br>" + "shipped to =" +commodity.shippedTo+ "<br>" + "Total Amount " +commodity.Total()+)
}
f1();
</script>
</head>
<body>
</body>
</html>