Skip to content
Advertisement

how do i put what is inputted with buttons through a function back to an index.html?

this is what ive got, the item pushes to the array when typed in to the input boxes and the button is clicked to submit, i just cant seem to get it displayed on the html not sure where ive went wrong

JavaScript
JavaScript

please help, i can see that the array is outputted in the console when typed into the buttons but nothing shows up on my html, am i not sourcing it somehow? i have the id set to garageOut on a div on the html

Advertisement

Answer

  1. You are not calling displayGarage after adding a new car.
  2. Simply calling it is not enough, you need to pass a new car to it

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement