My JavaScript is supposed to add elements from an array to a table with each iteration of for loop. However, when I load my HTML page into FireFox, nothing of the sort happens. The table just stays the way I have created it in HTML. What can be the issue here? The code that I inserted into the JavaScript can be found at https://www.w3schools.com/jsref/met_table_insertrow.asp
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Classic Swedish Pancakes Recipe</title>
<link href="HW5Part1.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<h1>Classic Swedish Pancakes</h1>
<table id = "myTable" class="ingredients">
<tr>
<th>Ingredient</th>
<th>Quantity</th>
</tr>
</table>
<script>
//Creating an array with ingredient (ingredient followed by its quantity
var ingredients = new Array(‘separated eggs’, '3',
'whole milk', '1 cup',
'melted unsalted butter', '4 Tbsp.',
'sugar', '2 Tbsp.',
'vanilla extract', '1 tsp.',
'table salt', '1/4 tsp.',
'all-purpose flour', '1 cup',
'butter', '2 tsp.');
//Assigning a variable to our table
var table = document.getElementById("myTable");
//Creating a for loop with 8 iterations
for (var i = 0; i <8; i++) {
var row = table.insertRow(i+1);
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
cell1.outerHTML = ingredients.item(i*2);
cell2.outerHTML = ingredients.item(i*2+1);}
</script>
</body>
</html>