Please help me to see what’s wrong with this code. Is not showing any error in the console and is not working too

Please, i need your help. I don’t know why this my javascript code is not working. i have checked it countless times and i can’t find the problem.

Are you sure when you are clicking the button you are submitting the form and therefore triggering submit event for which you have added listener?

Here is your list of issues with the application.

  1. HTML have extra div tag.
  2. Your JS addEventListener is registering the wrong element with the wrong event type.

Other than that, it works find after I correct it.

Thanks so much for your response, please don’t be offended, can you share me your correction or directly tell me the lines to make corrections. I don’t know why but is very difficult for me to pin point the problem.

From the tutorial I’m learning from, the instructor added the event listener to the book-form instead of the input submit and it was still working for him.
The whole thing is really frustrating me but I must not get tired or think of quitting.

Reason I asked that was to push you in the direction of the answer. Your event listener is for when form is submitted, but your button doesn’t submit the form.
So you need to either need to change the button or change element you add event listener to (and event).