Clearing my form inputs after submission
Your form is being submitted already as your button is type submit. Which in most browsers would result in a form submission and loading of the server response rather than executing javascript on the page. Change the type of the submit button to a button. Also, as this button is given the id submit, it … Read more