Hey My code does not seem to work.I want to assign a number to every order and create a table based on user input. But when I try to create the table nothing appens, I have added my code below so you all can see what could be my problem
<html>
<form id="orderer">
<input type="text">
</form>
<form id="condiments">
<select>
<option value="Mayo">Mayo</option>
<option value="BBQ">BBQ</option>
<option value="Ketchup">Ketchup</option>
</select>
</form>
<form id="payment">
<input type="checkbox" id="cash" name="cash" value="cash">
<label for="cash"> Cash</label><br>
<input type="checkbox" id="creditCard name="creditCard" value="creditCard">
<label for="creditCard"> Credit Card</label><br>
<input type="checkbox" id="venmo" name="venmo" value="venmo">
<label for="venmo"> Venmo</label><br>
</form>
<form id="tips">
<input type="number">
</form>
<button id="order" onclick="orderNumber++" >Order</button>
<table>
<thead>
<tr id="heads">
<th>Order</th>
<th>Condiments</th>
<th>Payment</th>
<th>Tips</th>
<th>Customer</th>
</tr>
</thead>
<tbody id="bodT">
</tbody>
</table>
</html>
JS
document.getElementById("order").addEventListener("click",table);
let orderNumber=0
function table(){
let customer=document.getElementById("orderer").value
let condiment= document.getElementById("condiments").value;
let payment = document.getElementById("payment").value;
let tips = document.getElementById("tips").value;
let rows="<tr><td>"+orderNumber+"</td><td>"+customer+"</td><td>"+condiment+"</td><td>"+payment+"</td><td>"+tips+"</td></tr>";
var btn = document.createElement("TR");
btn.innerHTML=rows;
document.getElementById("bodT").appendChild(btn);
}