It would have been better to use a form - this way you would only need handle the submit event - rather than separate code for text field keypress and button click. Much simpler, probably more accessible too.
Also, in your code samples you can use syntax highlighting by writing html, js etc. after the opening three backticks of the code section 👍
It would have been better to use a
form
- this way you would only need handle thesubmit
event - rather than separate code for text field keypress and button click. Much simpler, probably more accessible too.Also, in your code samples you can use syntax highlighting by writing
html
,js
etc. after the opening three backticks of the code section 👍well, that's a good idea , I will implement this in my next article